Package net.spy.memcached.ops

Examples of net.spy.memcached.ops.Operation.cancel()


    // Now cancel all the pending read operations.  Might be better to
    // to requeue them.
    while(hasReadOp()) {
      op=removeCurrentReadOp();
      getLogger().warn("Discarding partially completed op: %s", op);
      op.cancel();
    }

    getWbuf().clear();
    getRbuf().clear();
    toWrite=0;
View Full Code Here


    return new OperationFuture<Boolean>(blatch, flushResult) {
      @Override
      public boolean cancel(boolean ign) {
        boolean rv=false;
        for(Operation op : ops) {
          op.cancel();
          rv |= op.getState() == OperationState.WRITING;
        }
        return rv;
      }
      @Override
View Full Code Here

  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 {
View Full Code Here

    // 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();
View Full Code Here

    }

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


    getWbuf().clear();
    getRbuf().clear();
View Full Code Here

        operationTimeout) {
      @Override
      public boolean cancel(boolean ign) {
        boolean rv=false;
        for(Operation op : ops) {
          op.cancel();
          rv |= op.getState() == OperationState.WRITING;
        }
        return rv;
      }
      @Override
View Full Code Here

        // we can be interrupted if we were in the
        // process of auth'ing and the connection is
        // lost or dropped due to bad auth
        Thread.currentThread().interrupt();
        if (op != null) {
          op.cancel();
        }
        done.set(true); // If we were interrupted, tear down.
      }

      // Get the new status to inspect it.
View Full Code Here

        operationTimeout) {
      @Override
      public boolean cancel(boolean ign) {
        boolean rv = false;
        for (Operation op : ops) {
          op.cancel();
          rv |= op.getState() == OperationState.WRITE_QUEUED;
        }
        return rv;
      }
View Full Code Here

        // we can be interrupted if we were in the
        // process of auth'ing and the connection is
        // lost or dropped due to bad auth
        Thread.currentThread().interrupt();
        if (op != null) {
          op.cancel();
        }
        done.set(true); // If we were interrupted, tear down.
      }

      // Get the new status to inspect it.
View Full Code Here

  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 {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.