private void startupAcceptor() throws InterruptedException {
  if (!selectable) {
    registerQueue.clear();
    cancelQueue.clear();
  }
  Acceptor acceptor=acceptorRef.get();
  if (acceptor == null) {
    lock.acquire();
    acceptor=new Acceptor();
    if (acceptorRef.compareAndSet(null,acceptor)) {
      executeWorker(acceptor);
    }
 else {
      lock.release();
    }
  }
}

private void startupAcceptor ( ) throws InterruptedException { if ( ! selectable ) { registerQueue . clear ( ) ; cancelQueue . clear ( ) ; } Acceptor acceptor = acceptorRef . get ( ) ; if ( acceptor == null ) { lock . acquire ( ) ; acceptor = new Acceptor ( ) ; if ( acceptorRef . compareAndSet ( null , acceptor ) ) { executeWorker ( acceptor ) ; } else { lock . release ( ) ; } } }
this method is called by the dobind ( ) and dounbind ( ) methods . if the acceptor is null , the acceptor object will be created and kicked off by the executor . if the acceptor object is null , probably already created and this class is now working , then nothing will happen and the method will just return .
