* Use shared thread pool to execute stun messages decoding and processing. Set minimum required Java version to 1.8.
* Added missing argument comment.
* Added pooling of MessageProcessor objects to avoid extra allocations per RawMessage.
* Made MessageProcessor to be ForkJoinTask<Void> to avoid hidden allocation inside ForkJoinPool.
* Fixed comments according to last changes.
* Added dedicated method to reset state of pooled processor. More comments.
* Fixed comment typo.
* ForkJoinPool by default uses all available processors.
* Rollback JDK 8 changes in pom file since it looks they were only necessary for local build due to misconfigured IDE.
* Avoid usage of Java 8 features (lambda expressions & method references)
* Revert "Rollback JDK 8 changes in pom file since it looks they were only necessary for local build due to misconfigured IDE."
This reverts commit 840f18a554c4910f1af781aa729c58e833b0621f.
* Revert "Avoid usage of Java 8 features (lambda expressions & method references)"
This reverts commit b6ce70ebb40859be8f9249e070b6915feab59200.
* Renamed MessageProcessor into MessageProcessingTask to better reflect changed meaning of class.
* Use ForkJoinPool with prefixed threads to simplify debugging.
* Removed todo.
* Use well-known thread pool instead of ForkJoinPool. Could be easily changed back to ForkJoinPool.
* Fixed missing space.
* Fixes according to code review.
* Fixed active tasks tracking which was broken when pooling was added.
* Keep track of task processing throughput via QueueStatistics.
* Updated comment.
* Fixed comment.
* Updated comment.
* Updated comment.
* Updated comment.
* Renamed field to have better name.
* Fixed formatting.
* Restored old formatting corrupted by IDE.
* Fixed formatting.
* Fixed comment.
* Fixed comment.
* Updated comment.
* Updated log message.
* Code-style fixes to match rest of file.
* Fixed code style to match existing code.
* Fixed formatting.
* Restored accidentally removed comment.
* Added myself to list of authors.
* Reorder fields so final fields set in constructor come first, then mutable state of transaction.
* Rename STUN transaction lifetime field.
* Eliminate isRetransmitting field which is actually computed property from response != null
* Use monotonic clock (System.nanoTime) to check expiration. Replaced synchronized methods with atomic variables.
* Re-factored TransactionID implementation. Use less mutable state. Fixed hash function to produce random values, instead of sequentially growing values.
* Do no perform full Hashtable lookup to find transaction with specified ID.
* Use check before acquiring lock in StunStack.
* Implement ScheduledExecutorService based expired transaction collector.
* Restored self-cancel of expired server transactions collector when no server transactions at all.
* Fixed isExpire check in StunServerTransaction
* Fixed collection runnable to remove not only values but also keys from Hashtable.
* Perform elapsed check over milliseconds, not nanoseconds.
* Do not leave null values in clientTransactions/serverTransactions Hashtables when removing transaction, but leaving it's ID in Hashtable.
* Remove condition around cheap logger calls.
* Minor formatting fixes.
* Log number of non-expired transactions after collection to verity it is not growing over time.
* Fixed multi-line string formatting.
* Moved construction of ScheduledThreadPoolExecutor to helper method. Adjusted default settings of pool.
* Allow to create single threaded pool as well as bounded to number of CPUs on machine pool.
* Fixed name collision with same class in other package.
* Minor styling changes to reduce diff.
* Removed unused import.
* Do check of response when it's actually supposed to be non null.
* Add actual length to error message.
* Allow transaction ID of incorrect size.
* Allow constructing TransactionID with invalid length.
* Rollback all refactoring other than reducing thread count.
* Use default 1 minute timeout for threads in pool.
* Fixed typo in method name.
* Hide Runnable interface in StunClientTransaction class.
* Use CustomizableThreadFactory to give custom names to threads.
* Extracted retransmission logic into separate class.
* Re-implement Retransmitter with ScheduledThreadPoolExecutor.
* Fixed retransmissionCounter increment.
* Directly call logger fine methods instead overload with Level.
* Use ScheduleExecutorService to run STUN keep alives.
* Mark threads as daemon threads.
* Fixed comments. Rearranged properties read in keep alive runnable.
* Added early check that keep alives must not be sent
* Renamed method to check keep alive condition.
* Fixed formatting.
* Renamed metrod which check if KA should run.
* Created CustomizableThreadFactory which support thread name prefixes and if threads are daemons.
* Created dedicated runnable class which perform STUN keep-alive checks.
* Minor comments fixes.
* Do not expose Runnable interface from StunKeepAliveRunner.
* Mark CustomizableThreadFactory fields as final.
* Added java doc to CustomizableThreadFactory
* Fix thread leak when Agent is freed before termination timer triggered.
* Use ScheduledExecutorService to terminate agent with timeout
* Fixed formatting to match project code style.
* AbstractUdpListener should be able to release its resources
A new 'close' method has been added to AbstractUdpListener that is modeled after the 'close' implementation
of AbstractTcpListener.
This change can be used to prevent the issue described in https://github.com/jitsi/ice4j/issues/139
* Prevent concurrent modification of collection.
Part of the processing is removal from the collection that is being iterated over. To
avoid concurrent modification exceptions, a copy of the collection is made, prior to
iteration.
* Style fixes and added copyright notice.
This commit adds documentation only. It does not introduce functional changes.
The documentation was generated by crafting hex dumps from the values hardcoded
in the source code, which were fed to Wireshark (using its "import from hex dump"
option).
Waits until all of the Multiplexed sockets belonging to a Multiplexing
are closed before closing the Multiplexing socket. Also introduces the
"persistent" flag of Multiplexing, which keeps it open even after all
of its Multiplexed sockets are closed.
fix: Makes MultiplexingDatagramSocket#persistent final.
After the delegate is closed, isClosed() would return true,
which would prevent the DatagramSocket instance (super) from
actually closing and releasing its resources.
The problem was reproduced with java7 and defining multiple ipv6 fake(not-operational) addresses to one of the interfaces and running for a while.
Fixesjitsi/jitsi-meet#1390 and fixesjitsi/jicofo#167.