@Override public void updateMessage(Message message) throws IOException { if (LOG.isTraceEnabled()) { LOG.trace("updating: " + message.getMessageId() + " with deliveryCount: " + message.getRedeliveryCounter()); } KahaUpdateMessageCommand updateMessageCommand = new KahaUpdateMessageCommand(); KahaAddMessageCommand command = new KahaAddMessageCommand(); command.setDestination(dest); command.setMessageId(message.getMessageId().toProducerKey()); command.setPriority(message.getPriority()); command.setPrioritySupported(prioritizedMessages); org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(message); command.setMessage(new Buffer(packet.getData(), packet.getOffset(), packet.getLength())); updateMessageCommand.setMessage(command); store(updateMessageCommand, isEnableJournalDiskSyncs(), null, null); }
@Override public void addMessage(ConnectionContext context, Message message) throws IOException { KahaAddMessageCommand command = new KahaAddMessageCommand(); command.setDestination(dest); command.setMessageId(message.getMessageId().toProducerKey()); processAdd(command, message.getTransactionId(), wireFormat.marshal(message)); }
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 (hasMessage()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(4, getMessage()); } if (hasPriority()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeInt32Size(5, getPriority()); } if (hasPrioritySupported()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBoolSize(6, getPrioritySupported()); } memoizedSerializedSize = size; return size; }
public void clear() { super.clear(); clearTransactionInfo(); clearDestination(); clearMessageId(); clearMessage(); clearPriority(); clearPrioritySupported(); }
public static KahaAddMessageCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaAddMessageCommand().mergeFramed(data).checktInitialized(); }
public static KahaAddMessageCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaAddMessageCommand().mergeUnframed(data).checktInitialized(); }
public KahaAddMessageCommand clone() { return new KahaAddMessageCommand().mergeFrom(this); }
public KahaUpdateMessageCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException { while (true) { int tag = input.readTag(); if ((tag & 0x07) == 4) { return this; } switch (tag) { case 0: return this; default: { break; } case 10: if (hasMessage()) { getMessage().mergeFramed(input); } else { setMessage(new KahaAddMessageCommand().mergeFramed(input)); } break; } } } public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException {
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaAddMessageCommand.class ) return false; return equals((KahaAddMessageCommand)obj); }
public KahaAddMessageCommand getMessage() { if( this.f_message == null ) { this.f_message = new KahaAddMessageCommand(); } return this.f_message; }
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 (hasMessage()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(4, getMessage()); } if (hasPriority()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeInt32Size(5, getPriority()); } if (hasPrioritySupported()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBoolSize(6, getPrioritySupported()); } memoizedSerializedSize = size; return size; }
public void clear() { super.clear(); clearTransactionInfo(); clearDestination(); clearMessageId(); clearMessage(); clearPriority(); clearPrioritySupported(); }
public static KahaAddMessageCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaAddMessageCommand().mergeFramed(data).checktInitialized(); }
public static KahaAddMessageCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaAddMessageCommand().mergeUnframed(data).checktInitialized(); }
public void addMessage(ConnectionContext context, Message message) throws IOException { KahaAddMessageCommand command = new KahaAddMessageCommand(); command.setDestination(dest); command.setMessageId(message.getMessageId().toString()); processAdd(command, message.getTransactionId(), wireFormat.marshal(message)); }
public KahaAddMessageCommand clone() { return new KahaAddMessageCommand().mergeFrom(this); }
public KahaUpdateMessageCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException { while (true) { int tag = input.readTag(); if ((tag & 0x07) == 4) { return this; } switch (tag) { case 0: return this; default: { break; } case 10: if (hasMessage()) { getMessage().mergeFramed(input); } else { setMessage(new KahaAddMessageCommand().mergeFramed(input)); } break; } } } public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException {
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaAddMessageCommand.class ) return false; return equals((KahaAddMessageCommand)obj); }
public KahaAddMessageCommand getMessage() { if( this.f_message == null ) { this.f_message = new KahaAddMessageCommand(); } return this.f_message; }
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 (hasMessage()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBytesSize(4, getMessage()); } if (hasPriority()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeInt32Size(5, getPriority()); } if (hasPrioritySupported()) { size += org.apache.activemq.protobuf.CodedOutputStream.computeBoolSize(6, getPrioritySupported()); } memoizedSerializedSize = size; return size; }