Class SelectorFactory


  • public class SelectorFactory
    extends Object
    Temp selector factory,come from grizzly
    Author:
    dennis zhuang
    • Constructor Detail

      • SelectorFactory

        public SelectorFactory()
    • Method Detail

      • setMaxSelectors

        public static final void setMaxSelectors​(int size)
                                          throws IOException
        Set max selector pool size.
        Parameters:
        size - max pool size
        Throws:
        IOException
      • getMaxSelectors

        public static final int getMaxSelectors()
        Returns max selector pool size
        Returns:
        max pool size
      • getSelector

        public static final Selector getSelector()
        Get a exclusive Selector
        Returns:
        Selector
      • returnSelector

        public static final void returnSelector​(Selector s)
        Return the Selector to the cache
        Parameters:
        s - Selector