public interface ISelectorLoopPool
| Modifier and Type | Method and Description |
|---|---|
SelectorLoop |
getLoop(SelectableChannel channel)
Gets the best selector loop from this pool that should be used to process
given channel.
|
void |
join()
Waits for all selector loop's threads to die.
|
boolean |
join(long millis)
Waits at most
millis milliseconds for all selector loop's
threads to die. |
void |
quickStop()
Quickly stops all selector loops in this pool.
|
void |
stop()
Gently stops all selector loops in this pool.
|
void |
update(SelectorLoop loop,
int newSize,
int prevSize)
Notifies the pool that given selector loop is now processing different
number of channels.
|
void stop()
InternalSelectorLoop.stop(org.snf4j.core.StoppingType)void quickStop()
InternalSelectorLoop.quickStop()SelectorLoop getLoop(SelectableChannel channel)
channel - the channel that needs to be processed by a selector loop form
this poolnull if none could be returnedvoid update(SelectorLoop loop, int newSize, int prevSize)
getLoop method.loop - the selector loopnewSize - the new number of channels processed now by the selector loopprevSize - the previous number of channels processed by the selector loopboolean join(long millis)
throws InterruptedException
millis milliseconds for all selector loop's
threads to die.millis - the time to wait in millisecondstrue if the selector loop's thread diedInterruptedException - if any thread has interrupted the current threadIllegalArgumentException - if the value of millis is negativevoid join() throws InterruptedException
InterruptedException - if any thread has interrupted the current threadCopyright © 2017–2022 SNF4J.ORG. All rights reserved.