public final void setupResend() {
    // First, reset the current write op, or cancel it if we should
    // be authenticating
    Operation op = getCurrentWriteOp();
    if (shouldAuth && op != null) {
      op.cancel();
    } else if (op != null) {
      ByteBuffer buf = op.getBuffer();
      if (buf != null) {
        buf.reset();
      } else {
        getLogger().info("No buffer for current write op, removing");
        removeCurrentWriteOp();
      }
    }
    // Now cancel all the pending read operations. Might be better to
    // to requeue them.
    while (hasReadOp()) {
      op = removeCurrentReadOp();
      if (op != getCurrentWriteOp()) {
        getLogger().warn("Discarding partially completed op: %s", op);
        op.cancel();
      }
    }

    while (shouldAuth && hasWriteOp()) {
      op = removeCurrentWriteOp();
      getLogger().warn("Discarding partially completed op: %s", op);
      op.cancel();
    }

    getWbuf().clear();
    getRbuf().clear();
    toWrite = 0;
  }
public final void setupResend ( ) { Operation op = getCurrentWriteOp ( ) ; if ( shouldAuth && op != null ) { op . cancel ( ) ; } else if ( op != null ) { ByteBuffer buf = op . getBuffer ( ) ; if ( buf != null ) { buf . reset ( ) ; } else { getLogger ( ) . info ( "No buffer for current write op, removing" ) ; removeCurrentWriteOp ( ) ; } } while ( hasReadOp ( ) ) { op = removeCurrentReadOp ( ) ; if ( op != getCurrentWriteOp ( ) ) { getLogger ( ) . warn ( "Discarding partially completed op: %s" , op ) ; op . cancel ( ) ; } } while ( shouldAuth && hasWriteOp ( ) ) { op = removeCurrentWriteOp ( ) ; getLogger ( ) . warn ( "Discarding partially completed op: %s" , op ) ; op . cancel ( ) ; } getWbuf ( ) . clear ( ) ; getRbuf ( ) . clear ( ) ; toWrite = 0 ; }
/*
(non-Javadoc)

@see net.spy.memcached.MemcachedNode#setupResend()