public MutatorOperation mutate(Mutator m, String key, long by, long exp, int def, OperationCallback cb) { return new MutatorOperationImpl(m, key, by, cb); }
@Override public void handleLine(String line) { getLogger().debug("Result: %s", line); OperationStatus found = null; if (line.equals("NOT_FOUND")) { found = NOT_FOUND; } else { found = new OperationStatus(true, line); } getCallback().receivedStatus(found); transitionState(OperationState.COMPLETE); }
@Override public void initialize() { int size=KeyUtil.getKeyBytes(key).length + OVERHEAD; ByteBuffer b=ByteBuffer.allocate(size); setArguments(b, mutator.name(), key, amount); b.flip(); setBuffer(b); }
@Override public void handleLine(String line) { /* ENABLE_REPLICATION if */ if (line.equals("SWITCHOVER") || line.equals("REPL_SLAVE")) { receivedMoveOperations(line); } /* ENABLE_REPLICATION end */ OperationStatus status = null; try { Long.valueOf(line); getCallback().receivedStatus(new OperationStatus(true, line)); } catch (NumberFormatException e) { status = matchStatus(line, NOT_FOUND, TYPE_MISMATCH); getCallback().receivedStatus(status); } transitionState(OperationState.COMPLETE); }
@Override protected void wasCancelled() { // XXX: Replace this comment with why the hell I did this. getCallback().receivedStatus(CANCELLED); }
@Override public void handleLine(String line) { getLogger().debug("Result: %s", line); OperationStatus found = null; if (line.equals("NOT_FOUND")) { found = NOT_FOUND; } else { found = new OperationStatus(true, line, StatusCode.SUCCESS); } getCallback().receivedStatus(found); transitionState(OperationState.COMPLETE); }
@Override public void initialize() { int size = KeyUtil.getKeyBytes(key).length + OVERHEAD; ByteBuffer b = ByteBuffer.allocate(size); if (def > -1) { setArguments(b, mutator.name(), key, amount, 0, exp, def); } else { setArguments(b, mutator.name(), key, amount); } b.flip(); setBuffer(b); }
@Override protected void wasCancelled() { // XXX: Replace this comment with why the hell I did this. getCallback().receivedStatus(CANCELLED); }
@Override public void handleLine(String line) { getLogger().debug("Result: %s", line); OperationStatus found=null; if(line.equals("NOT_FOUND")) { found=NOT_FOUND; } else { found=new OperationStatus(true, line); } getCallback().receivedStatus(found); transitionState(OperationState.COMPLETE); }
@Override public void initialize() { int size = KeyUtil.getKeyBytes(key).length + OVERHEAD; ByteBuffer b = ByteBuffer.allocate(size); setArguments(b, mutator.name(), key, amount); b.flip(); setBuffer(b); }
@Override protected void wasCancelled() { // XXX: Replace this comment with why the hell I did this. getCallback().receivedStatus(CANCELLED); }
public MutatorOperation mutate(Mutator m, String key, int by, long exp, int def, OperationCallback cb) { return new MutatorOperationImpl(m, key, by, cb); }
@Override public void handleLine(String line) { getLogger().debug("Result: %s", line); OperationStatus found = null; if (line.equals("NOT_FOUND")) { found = NOT_FOUND; } else { found = new OperationStatus(true, line, StatusCode.SUCCESS); } getCallback().receivedStatus(found); transitionState(OperationState.COMPLETE); }
@Override public void initialize() { int size = KeyUtil.getKeyBytes(key).length + OVERHEAD; ByteBuffer b = ByteBuffer.allocate(size); setArguments(b, mutator.name(), key, amount); b.flip(); setBuffer(b); }
@Override protected void wasCancelled() { // XXX: Replace this comment with why the hell I did this. getCallback().receivedStatus(CANCELLED); }
public MutatorOperation mutate(Mutator m, String key, int by, long def, int exp, OperationCallback cb) { return new MutatorOperationImpl(m, key, by, def, exp, cb); }
@Override public void handleLine(String line) { getLogger().debug("Result: %s", line); OperationStatus found=null; if(line.equals("NOT_FOUND")) { found=NOT_FOUND; } else { found=new OperationStatus(true, line); } getCallback().receivedStatus(found); transitionState(OperationState.COMPLETE); }
@Override public void initialize() { int size = KeyUtil.getKeyBytes(key).length + OVERHEAD; ByteBuffer b = ByteBuffer.allocate(size); setArguments(b, mutator.name(), key, amount); b.flip(); setBuffer(b); }
@Override protected void wasCancelled() { // XXX: Replace this comment with why the hell I did this. getCallback().receivedStatus(CANCELLED); }
public MutatorOperation mutate(Mutator m, String key, long by, long exp, int def, OperationCallback cb) { return new MutatorOperationImpl(m, key, by, cb); }