public StatsOperation stats(String arg, net.spy.memcached.ops.StatsOperation.Callback cb) { return new StatsOperationImpl(arg, cb); }
public StatsOperationImpl(String arg, StatsOperation.Callback c) { super(CMD, generateOpaque(), c); key = (arg == null) ? "" : arg; }
@Override public void initialize() { prepareBuffer(key, 0, EMPTY_BYTES); }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (keyLen > 0) { final byte[] keyBytes = new byte[keyLen]; final byte[] data = new byte[pl.length - keyLen]; System.arraycopy(pl, 0, keyBytes, 0, keyLen); System.arraycopy(pl, keyLen, data, 0, pl.length - keyLen); Callback cb = (Callback) getCallback(); cb.gotStat(new String(keyBytes, "UTF-8"), new String(data, "UTF-8")); } else { OperationStatus status = getStatusForErrorCode(errorCode, pl); getCallback().receivedStatus(status); transitionState(OperationState.COMPLETE); } resetInput(); } }
@Override protected void finishedPayload(byte[] pl) throws IOException { if(keyLen > 0) { final byte[] keyBytes=new byte[keyLen]; final byte[] data=new byte[pl.length - keyLen]; System.arraycopy(pl, 0, keyBytes, 0, keyLen); System.arraycopy(pl, keyLen, data, 0, pl.length-keyLen); Callback cb=(Callback)getCallback(); cb.gotStat(new String(keyBytes, "UTF-8"), new String(data, "UTF-8")); } else { getCallback().receivedStatus(STATUS_OK); transitionState(OperationState.COMPLETE); } resetInput(); }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (keyLen > 0) { final byte[] keyBytes = new byte[keyLen]; final byte[] data = new byte[pl.length - keyLen]; System.arraycopy(pl, 0, keyBytes, 0, keyLen); System.arraycopy(pl, keyLen, data, 0, pl.length - keyLen); Callback cb = (Callback) getCallback(); cb.gotStat(new String(keyBytes, "UTF-8"), new String(data, "UTF-8")); } else { OperationStatus status = getStatusForErrorCode(errorCode, pl); getCallback().receivedStatus(status); transitionState(OperationState.COMPLETE); } resetInput(); } }
@Override protected void finishedPayload(byte[] pl) throws IOException { if(keyLen > 0) { final byte[] keyBytes=new byte[keyLen]; final byte[] data=new byte[pl.length - keyLen]; System.arraycopy(pl, 0, keyBytes, 0, keyLen); System.arraycopy(pl, keyLen, data, 0, pl.length-keyLen); Callback cb=(Callback)getCallback(); cb.gotStat(new String(keyBytes, "UTF-8"), new String(data, "UTF-8")); } else { getCallback().receivedStatus(STATUS_OK); transitionState(OperationState.COMPLETE); } resetInput(); }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (keyLen > 0) { final byte[] keyBytes = new byte[keyLen]; final byte[] data = new byte[pl.length - keyLen]; System.arraycopy(pl, 0, keyBytes, 0, keyLen); System.arraycopy(pl, keyLen, data, 0, pl.length - keyLen); Callback cb = (Callback) getCallback(); cb.gotStat(new String(keyBytes, "UTF-8"), new String(data, "UTF-8")); } else { OperationStatus status = getStatusForErrorCode(errorCode, pl); getCallback().receivedStatus(status); transitionState(OperationState.COMPLETE); } resetInput(); } }
@Override protected void finishedPayload(byte[] pl) throws IOException { if (keyLen > 0) { final byte[] keyBytes = new byte[keyLen]; final byte[] data = new byte[pl.length - keyLen]; System.arraycopy(pl, 0, keyBytes, 0, keyLen); System.arraycopy(pl, keyLen, data, 0, pl.length - keyLen); Callback cb = (Callback) getCallback(); cb.gotStat(new String(keyBytes, "UTF-8"), new String(data, "UTF-8")); } else { getCallback().receivedStatus(STATUS_OK); transitionState(OperationState.COMPLETE); } resetInput(); }
public StatsOperation stats(String arg, net.spy.memcached.ops.StatsOperation.Callback cb) { return new StatsOperationImpl(arg, cb); }
@Override public void initialize() { prepareBuffer(key, 0, EMPTY_BYTES); }
public StatsOperationImpl(String arg, StatsOperation.Callback c) { super(CMD, generateOpaque(), c); key = (arg == null) ? "" : arg; }
public StatsOperation stats(String arg, net.spy.memcached.ops.StatsOperation.Callback cb) { return new StatsOperationImpl(arg, cb); }
@Override public void initialize() { prepareBuffer(key, 0, EMPTY_BYTES); }
public StatsOperationImpl(String arg, StatsOperation.Callback c) { super(CMD, generateOpaque(), c); key=(arg == null) ? "" : arg; }
public StatsOperation stats(String arg, net.spy.memcached.ops.StatsOperation.Callback cb) { return new StatsOperationImpl(arg, cb); }
@Override public void initialize() { prepareBuffer(key, 0, EMPTY_BYTES); }
public StatsOperationImpl(String arg, StatsOperation.Callback c) { super(CMD, generateOpaque(), c); key = (arg == null) ? "" : arg; }
public StatsOperation stats(String arg, net.spy.memcached.ops.StatsOperation.Callback cb) { return new StatsOperationImpl(arg, cb); }
@Override public void initialize() { prepareBuffer(key, 0, EMPTY_BYTES); }