Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » tomcat » util » net » [javadoc | source]
org.apache.tomcat.util.net
public class: NioSelectorPool [javadoc | source]
java.lang.Object
   org.apache.tomcat.util.net.NioSelectorPool
Thread safe non blocking selector pool
Field Summary
protected static  int threadCount     
protected static  Log log     
protected static final  boolean SHARED     
protected  NioBlockingSelector blockingSelector     
protected  Selector SHARED_SELECTOR     
protected  int maxSelectors     
protected  long sharedSelectorTimeout     
protected  int maxSpareSelectors     
protected  boolean enabled     
protected  AtomicInteger active     
protected  AtomicInteger spare     
protected  ConcurrentLinkedQueue<Selector> selectors     
Constructor:
 public NioSelectorPool() 
Method from org.apache.tomcat.util.net.NioSelectorPool Summary:
close,   get,   getMaxSelectors,   getMaxSpareSelectors,   getSelectors,   getSharedSelector,   getSharedSelectorTimeout,   getSpare,   isEnabled,   open,   put,   read,   read,   setEnabled,   setMaxSelectors,   setMaxSpareSelectors,   setSharedSelectorTimeout,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tomcat.util.net.NioSelectorPool Detail:
 public  void close() throws IOException 
 public Selector get() throws IOException 
 public int getMaxSelectors() 
 public int getMaxSpareSelectors() 
 public ConcurrentLinkedQueue getSelectors() 
 protected Selector getSharedSelector() throws IOException 
 public long getSharedSelectorTimeout() 
 public AtomicInteger getSpare() 
 public boolean isEnabled() 
 public  void open() throws IOException 
 public  void put(Selector s) throws IOException 
 public int read(ByteBuffer buf,
    NioChannel socket,
    Selector selector,
    long readTimeout) throws IOException 
    Performs a blocking read using the bytebuffer for data to be read and a selector to block. If the selector parameter is null, then it will perform a busy read that could take up a lot of CPU cycles.
 public int read(ByteBuffer buf,
    NioChannel socket,
    Selector selector,
    long readTimeout,
    boolean block) throws IOException 
    Performs a read using the bytebuffer for data to be read and a selector to register for events should you have the block=true. If the selector parameter is null, then it will perform a busy read that could take up a lot of CPU cycles.
 public  void setEnabled(boolean enabled) 
 public  void setMaxSelectors(int maxSelectors) 
 public  void setMaxSpareSelectors(int maxSpareSelectors) 
 public  void setSharedSelectorTimeout(long sharedSelectorTimeout) 
 public int write(ByteBuffer buf,
    NioChannel socket,
    Selector selector,
    long writeTimeout) throws IOException 
    Performs a blocking write using the bytebuffer for data to be written and a selector to block. If the selector parameter is null, then it will perform a busy write that could take up a lot of CPU cycles.
 public int write(ByteBuffer buf,
    NioChannel socket,
    Selector selector,
    long writeTimeout,
    boolean block,
    MutableInteger lastWrite) throws IOException