String subscriptionKey = command.getSubscriptionKey(); if (command.getAck() != UNMATCHED) { sd.orderIndex.get(tx, sequence); metadata.lastUpdate = ackLocation; } else if (LOG.isDebugEnabled()) { LOG.debug("on ack, no message sequence exists for id: " + command.getMessageId() + " and sub: " + command.getSubscriptionKey());
private void updateIndex(Transaction tx, KahaRemoveMessageCommand command) throws IOException { StoredDestination sd = getStoredDestination(command.getDestination(), tx); if (!command.hasSubscriptionKey()) { // In the queue case we just remove the message from the index.. Long sequenceId = sd.messageIdIndex.remove(tx, command.getMessageId()); if (sequenceId != null) { sd.orderIndex.remove(tx, sequenceId); } } else { // In the topic case we need remove the message once it's been acked // by all the subs Long sequence = sd.messageIdIndex.get(tx, command.getMessageId()); // Make sure it's a valid message id... if (sequence != null) { String subscriptionKey = command.getSubscriptionKey(); Long prev = sd.subscriptionAcks.put(tx, subscriptionKey, sequence); // The following method handles deleting un-referenced messages. removeAckByteSequence(tx, sd, subscriptionKey, prev); // Add it to the new location set. addAckByteSequence(sd, sequence, subscriptionKey); } } }
public int hashCode() { int rc=-64211337; if (hasTransactionInfo()) { rc ^= ( 265667724^getTransactionInfo().hashCode() ); } if (hasDestination()) { rc ^= ( 238021614^getDestination().hashCode() ); } if (hasMessageId()) { rc ^= ( 563954530^getMessageId().hashCode() ); } if (hasAck()) { rc ^= ( 65641^getAck().hashCode() ); } if (hasSubscriptionKey()) { rc ^= ( 1895830498^getSubscriptionKey().hashCode() ); } return rc; }
public int hashCode() { int rc=-64211337; if (hasTransactionInfo()) { rc ^= ( 265667724^getTransactionInfo().hashCode() ); } if (hasDestination()) { rc ^= ( 238021614^getDestination().hashCode() ); } if (hasMessageId()) { rc ^= ( 563954530^getMessageId().hashCode() ); } if (hasAck()) { rc ^= ( 65641^getAck().hashCode() ); } if (hasSubscriptionKey()) { rc ^= ( 1895830498^getSubscriptionKey().hashCode() ); } return rc; }
public int hashCode() { int rc=-64211337; if (hasTransactionInfo()) { rc ^= ( 265667724^getTransactionInfo().hashCode() ); } if (hasDestination()) { rc ^= ( 238021614^getDestination().hashCode() ); } if (hasMessageId()) { rc ^= ( 563954530^getMessageId().hashCode() ); } if (hasAck()) { rc ^= ( 65641^getAck().hashCode() ); } if (hasSubscriptionKey()) { rc ^= ( 1895830498^getSubscriptionKey().hashCode() ); } return rc; }
public int hashCode() { int rc=-64211337; if (hasTransactionInfo()) { rc ^= ( 265667724^getTransactionInfo().hashCode() ); } if (hasDestination()) { rc ^= ( 238021614^getDestination().hashCode() ); } if (hasMessageId()) { rc ^= ( 563954530^getMessageId().hashCode() ); } if (hasAck()) { rc ^= ( 65641^getAck().hashCode() ); } if (hasSubscriptionKey()) { rc ^= ( 1895830498^getSubscriptionKey().hashCode() ); } return rc; }
public boolean equals(KahaRemoveMessageCommand obj) { if (hasTransactionInfo() ^ obj.hasTransactionInfo() ) return false; if (hasTransactionInfo() && ( !getTransactionInfo().equals(obj.getTransactionInfo()) )) return false; if (hasDestination() ^ obj.hasDestination() ) return false; if (hasDestination() && ( !getDestination().equals(obj.getDestination()) )) return false; if (hasMessageId() ^ obj.hasMessageId() ) return false; if (hasMessageId() && ( !getMessageId().equals(obj.getMessageId()) )) return false; if (hasAck() ^ obj.hasAck() ) return false; if (hasAck() && ( !getAck().equals(obj.getAck()) )) return false; if (hasSubscriptionKey() ^ obj.hasSubscriptionKey() ) return false; if (hasSubscriptionKey() && ( !getSubscriptionKey().equals(obj.getSubscriptionKey()) )) return false; return true; }
public boolean equals(KahaRemoveMessageCommand obj) { if (hasTransactionInfo() ^ obj.hasTransactionInfo() ) return false; if (hasTransactionInfo() && ( !getTransactionInfo().equals(obj.getTransactionInfo()) )) return false; if (hasDestination() ^ obj.hasDestination() ) return false; if (hasDestination() && ( !getDestination().equals(obj.getDestination()) )) return false; if (hasMessageId() ^ obj.hasMessageId() ) return false; if (hasMessageId() && ( !getMessageId().equals(obj.getMessageId()) )) return false; if (hasAck() ^ obj.hasAck() ) return false; if (hasAck() && ( !getAck().equals(obj.getAck()) )) return false; if (hasSubscriptionKey() ^ obj.hasSubscriptionKey() ) return false; if (hasSubscriptionKey() && ( !getSubscriptionKey().equals(obj.getSubscriptionKey()) )) return false; return true; }
public boolean equals(KahaRemoveMessageCommand obj) { if (hasTransactionInfo() ^ obj.hasTransactionInfo() ) return false; if (hasTransactionInfo() && ( !getTransactionInfo().equals(obj.getTransactionInfo()) )) return false; if (hasDestination() ^ obj.hasDestination() ) return false; if (hasDestination() && ( !getDestination().equals(obj.getDestination()) )) return false; if (hasMessageId() ^ obj.hasMessageId() ) return false; if (hasMessageId() && ( !getMessageId().equals(obj.getMessageId()) )) return false; if (hasAck() ^ obj.hasAck() ) return false; if (hasAck() && ( !getAck().equals(obj.getAck()) )) return false; if (hasSubscriptionKey() ^ obj.hasSubscriptionKey() ) return false; if (hasSubscriptionKey() && ( !getSubscriptionKey().equals(obj.getSubscriptionKey()) )) return false; return true; }
private void updateIndex(Transaction tx, KahaRemoveMessageCommand command) throws IOException { StoredDestination sd = getStoredDestination(command.getDestination(), tx); if (!command.hasSubscriptionKey()) { // In the queue case we just remove the message from the index.. Long sequenceId = sd.messageIdIndex.remove(tx, command.getMessageId()); if (sequenceId != null) { sd.orderIndex.remove(tx, sequenceId); } } else { // In the topic case we need remove the message once it's been acked // by all the subs Long sequence = sd.messageIdIndex.get(tx, command.getMessageId()); // Make sure it's a valid message id... if (sequence != null) { String subscriptionKey = command.getSubscriptionKey(); Long prev = sd.subscriptionAcks.put(tx, subscriptionKey, sequence); // The following method handles deleting un-referenced messages. removeAckByteSequence(tx, sd, subscriptionKey, prev); // Add it to the new location set. addAckByteSequence(sd, sequence, subscriptionKey); } } }
private void updateIndex(Transaction tx, KahaRemoveMessageCommand command) throws IOException { StoredDestination sd = getStoredDestination(command.getDestination(), tx); if (!command.hasSubscriptionKey()) { // In the queue case we just remove the message from the index.. Long sequenceId = sd.messageIdIndex.remove(tx, command.getMessageId()); if (sequenceId != null) { sd.orderIndex.remove(tx, sequenceId); } } else { // In the topic case we need remove the message once it's been acked // by all the subs Long sequence = sd.messageIdIndex.get(tx, command.getMessageId()); // Make sure it's a valid message id... if (sequence != null) { String subscriptionKey = command.getSubscriptionKey(); Long prev = sd.subscriptionAcks.put(tx, subscriptionKey, sequence); // The following method handles deleting un-referenced messages. removeAckByteSequence(tx, sd, subscriptionKey, prev); // Add it to the new location set. addAckByteSequence(sd, sequence, subscriptionKey); } } }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasTransactionInfo()) { writeMessage(output, 1, getTransactionInfo()); } if (hasDestination()) { writeMessage(output, 2, getDestination()); } if (hasMessageId()) { output.writeString(3, getMessageId()); } if (hasAck()) { output.writeBytes(4, getAck()); } if (hasSubscriptionKey()) { output.writeString(5, getSubscriptionKey()); } }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasTransactionInfo()) { writeMessage(output, 1, getTransactionInfo()); } if (hasDestination()) { writeMessage(output, 2, getDestination()); } if (hasMessageId()) { output.writeString(3, getMessageId()); } if (hasAck()) { output.writeBytes(4, getAck()); } if (hasSubscriptionKey()) { output.writeString(5, getSubscriptionKey()); } }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasTransactionInfo()) { writeMessage(output, 1, getTransactionInfo()); } if (hasDestination()) { writeMessage(output, 2, getDestination()); } if (hasMessageId()) { output.writeString(3, getMessageId()); } if (hasAck()) { output.writeBytes(4, getAck()); } if (hasSubscriptionKey()) { output.writeString(5, getSubscriptionKey()); } }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasTransactionInfo()) { writeMessage(output, 1, getTransactionInfo()); } if (hasDestination()) { writeMessage(output, 2, getDestination()); } if (hasMessageId()) { output.writeString(3, getMessageId()); } if (hasAck()) { output.writeBytes(4, getAck()); } if (hasSubscriptionKey()) { output.writeString(5, getSubscriptionKey()); } }
public int serializedSizeUnframed() { if (memoizedSerializedSize != -1) return memoizedSerializedSize; int size = 0; if (hasTransactionInfo()) { size += computeMessageSize(1, getTransactionInfo()); } if (hasDestination()) { size += computeMessageSize(2, getDestination()); } if (hasMessageId()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(3, getMessageId()); } if (hasAck()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(4, getAck()); } if (hasSubscriptionKey()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(5, getSubscriptionKey()); } memoizedSerializedSize = size; return size; }
public int serializedSizeUnframed() { if (memoizedSerializedSize != -1) return memoizedSerializedSize; int size = 0; if (hasTransactionInfo()) { size += computeMessageSize(1, getTransactionInfo()); } if (hasDestination()) { size += computeMessageSize(2, getDestination()); } if (hasMessageId()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(3, getMessageId()); } if (hasAck()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(4, getAck()); } if (hasSubscriptionKey()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(5, getSubscriptionKey()); } memoizedSerializedSize = size; return size; }
public int serializedSizeUnframed() { if (memoizedSerializedSize != -1) return memoizedSerializedSize; int size = 0; if (hasTransactionInfo()) { size += computeMessageSize(1, getTransactionInfo()); } if (hasDestination()) { size += computeMessageSize(2, getDestination()); } if (hasMessageId()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(3, getMessageId()); } if (hasAck()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(4, getAck()); } if (hasSubscriptionKey()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(5, getSubscriptionKey()); } memoizedSerializedSize = size; return size; }
public KahaRemoveMessageCommand mergeFrom(KahaRemoveMessageCommand other) { if (other.hasTransactionInfo()) { if (hasTransactionInfo()) { getTransactionInfo().mergeFrom(other.getTransactionInfo()); } else { setTransactionInfo(other.getTransactionInfo().clone()); } } if (other.hasDestination()) { if (hasDestination()) { getDestination().mergeFrom(other.getDestination()); } else { setDestination(other.getDestination().clone()); } } if (other.hasMessageId()) { setMessageId(other.getMessageId()); } if (other.hasAck()) { setAck(other.getAck()); } if (other.hasSubscriptionKey()) { setSubscriptionKey(other.getSubscriptionKey()); } return this; }
public KahaRemoveMessageCommand mergeFrom(KahaRemoveMessageCommand other) { if (other.hasTransactionInfo()) { if (hasTransactionInfo()) { getTransactionInfo().mergeFrom(other.getTransactionInfo()); } else { setTransactionInfo(other.getTransactionInfo().clone()); } } if (other.hasDestination()) { if (hasDestination()) { getDestination().mergeFrom(other.getDestination()); } else { setDestination(other.getDestination().clone()); } } if (other.hasMessageId()) { setMessageId(other.getMessageId()); } if (other.hasAck()) { setAck(other.getAck()); } if (other.hasSubscriptionKey()) { setSubscriptionKey(other.getSubscriptionKey()); } return this; }