code: static Selector getTemporarySelector(SelectableChannel sc)
          throws IOException
      {
          SoftReference<SelectorWrapper> ref = localSelector.get();
          SelectorWrapper selWrapper = null;
          Selector sel = null;
          if (ref == null
              || ((selWrapper = ref.get()) == null)
              || ((sel = selWrapper.get()) == null)
              || (sel.provider() != sc.provider())) {
              sel = sc.provider().openSelector();
              selWrapper = new SelectorWrapper(sel);
              localSelector.set(new SoftReference<SelectorWrapper>(selWrapper));
          }
          localSelectorWrapper.set(selWrapper);
          return sel;
      }
docs: the selector by invoking releaseTemporarySelector()