Class SelectorFactory

java.lang.Object
com.google.code.yanf4j.util.SelectorFactory

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

  • Constructor Details

    • SelectorFactory

      public SelectorFactory()
  • Method Details

    • 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