Code example for SelectionKey

Methods: interestOps

0
 
        // since we're already in the select loop here for sure, we can just 
        // modify our selection key directly. 
        if (buffer_.remaining() == 0) {
          // get rid of the read select interests 
          selectionKey_.interestOps(0);
          state_ = FrameBufferState.READ_FRAME_COMPLETE;
        } 
 
        return true; 
      } 
 
      // if we fall through to this point, then the state must be invalid. 
      Log.e("Thrift", "Read was called but state is invalid (" + state_ + ")");
      return false; 
    } 
 
    /** 
     * Give this FrameBuffer a chance to write its output to the final client. 
     */ 
Contextual code suggestions in your IDE  Get Codota for Java