public class SelectorPool
extends java.lang.Object
cleanup()
for releasing selectors.Constructor and Description |
---|
SelectorPool() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Clean up a pool.
|
java.nio.channels.Selector |
get()
Get a selector from the pool (or create a new one).
|
java.nio.channels.Selector |
get(java.nio.channels.spi.SelectorProvider provider)
Get a selector from the pool (or create a new one).
|
void |
put(java.nio.channels.Selector selector)
Put a selector back into the pool.
|
public java.nio.channels.Selector get() throws java.io.IOException
java.io.IOException
- if there's a problem opening a new selectorpublic java.nio.channels.Selector get(java.nio.channels.spi.SelectorProvider provider) throws java.io.IOException
java.io.IOException
- if there's a problem opening a new selectorpublic void put(java.nio.channels.Selector selector)
selector
- the selector to put backpublic void cleanup()
Copyright © 2001-2019 JRuby. All Rights Reserved.