public int compare(Command c1, Command c2) { return c1.getCommandId() - c2.getCommandId(); }
@Override public String toString() { return command.getCommandId() + "=" + ackCount.get(); } }
/** * Lets attempt to replay the request as a command may have disappeared */ protected void onMissingResponse(Command command, FutureResponse response) { LOG.debug("Still waiting for response on: " + this + " to command: " + command + " sending replay message"); int commandId = command.getCommandId(); requestReplay(commandId, commandId); }
int actualCounter = command.getCommandId(); boolean valid = expectedCounter == actualCounter; if (!empty) { Command nextAvailable = commands.first(); nextCounter = nextAvailable.getCommandId(); valid = expectedCounter == command.getCommandId(); if (valid) { commands.remove(command); valid = expectedCounter == command.getCommandId(); if (valid) { commands.remove(command);
if (stateTracker.track(command) == null && command.isResponseRequired()) { int size = fanout ? minAckCount : 1; requestMap.put(new Integer(command.getCommandId()), new RequestCounter(command, size));
Response response = null; boolean responseRequired = command.isResponseRequired(); int commandId = command.getCommandId(); try { if (status.get() != PENDING_STOP) {
public FutureResponse asyncRequest(Object o, ResponseCallback responseCallback) throws IOException { Command command = (Command) o; command.setCommandId(sequenceGenerator.getNextSequenceId()); command.setResponseRequired(true); FutureResponse future = new FutureResponse(responseCallback, this); IOException priorError = null; synchronized (requestMap) { priorError = this.error; if (priorError == null) { requestMap.put(new Integer(command.getCommandId()), future); } } if (priorError != null) { future.set(new ExceptionResponse(priorError)); throw priorError; } next.oneway(command); return future; }
if (command.isResponseRequired()) { Response response = new Response(); response.setCorrelationId(command.getCommandId()); processCommand(response); requestMap.put(Integer.valueOf(command.getCommandId()), tracked); } else if (tracked == null && command.isResponseRequired()) { requestMap.put(Integer.valueOf(command.getCommandId()), command); requestMap.remove(Integer.valueOf(command.getCommandId()));
int commandId = command.getCommandId(); if (fragment > 0) { commandId = sequenceGenerator.getNextSequenceId(); sendWriteBuffer(command.getCommandId(), address, writeBuffer, false);
sendWriteBuffer(address, writeBuffer, command.getCommandId()); } else { int commandId = command.getCommandId(); if (fragment > 0) { commandId = sequenceGenerator.getNextSequenceId();
@Override public String toString() { return command.getCommandId() + "=" + ackCount.get(); } }
@Override public String toString() { return command.getCommandId() + "=" + ackCount.get(); } }
@Override public String toString() { return command.getCommandId() + "=" + ackCount.get(); } }
@Override public String toString() { return command.getCommandId() + "=" + ackCount.get(); } }
/** * Lets attempt to replay the request as a command may have disappeared */ protected void onMissingResponse(Command command, FutureResponse response) { LOG.debug("Still waiting for response on: " + this + " to command: " + command + " sending replay message"); int commandId = command.getCommandId(); requestReplay(commandId, commandId); }
/** * Lets attempt to replay the request as a command may have disappeared */ protected void onMissingResponse(Command command, FutureResponse response) { LOG.debug("Still waiting for response on: " + this + " to command: " + command + " sending replay message"); int commandId = command.getCommandId(); requestReplay(commandId, commandId); }
/** * Lets attempt to replay the request as a command may have disappeared */ protected void onMissingResponse(Command command, FutureResponse response) { LOG.debug("Still waiting for response on: " + this + " to command: " + command + " sending replay message"); int commandId = command.getCommandId(); requestReplay(commandId, commandId); }
void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(lastCommandId.incrementAndGet()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } amqpTransport.sendToActiveMQ(command); }
void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(lastCommandId.incrementAndGet()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } amqpTransport.sendToActiveMQ(command); }
protected void sendToActiveMQ(Command command, ResponseHandler handler) { command.setCommandId(generateCommandId()); if (handler != null) { command.setResponseRequired(true); resposeHandlers.put(Integer.valueOf(command.getCommandId()), handler); } stompTransport.sendToActiveMQ(command); }