public void signal() {
      if (state.getAndSet(State.SIGNALLED) == State.READY) {
        watcher.enqueue(this);
      }
    }
Sets the state to SIGNALLED and enqueues this key with the watcher if it was previously in
the READY state.
jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java