@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); }
switch (command.type()) { case KAHA_UPDATE_MESSAGE_COMMAND: addMessage = ((KahaUpdateMessageCommand) command).getMessage(); break; case KAHA_ADD_MESSAGE_COMMAND:
public static KahaUpdateMessageCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaUpdateMessageCommand().mergeFramed(data).checktInitialized(); }
public static KahaUpdateMessageCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaUpdateMessageCommand().mergeUnframed(data).checktInitialized(); }
public KahaUpdateMessageCommand mergeFrom(KahaUpdateMessageCommand other) { if (other.hasMessage()) { if (hasMessage()) { getMessage().mergeFrom(other.getMessage()); } else { setMessage(other.getMessage().clone()); } } return this; }
public boolean equals(KahaUpdateMessageCommand obj) { if (hasMessage() ^ obj.hasMessage() ) return false; if (hasMessage() && ( !getMessage().equals(obj.getMessage()) )) return false; return true; }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasMessage()) { writeMessage(output, 1, getMessage()); } }
public int serializedSizeUnframed() { if (memoizedSerializedSize != -1) return memoizedSerializedSize; int size = 0; if (hasMessage()) { size += computeMessageSize(1, getMessage()); } memoizedSerializedSize = size; return size; }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasMessage() ) { missingFields.add("message"); } if( hasMessage() ) { try { getMessage().assertInitialized(); } catch (org.apache.activemq.protobuf.UninitializedMessageException e){ missingFields.addAll(prefix(e.getMissingFields(),"message.")); } } return missingFields; }
public KahaUpdateMessageCommand clone() { return new KahaUpdateMessageCommand().mergeFrom(this); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaUpdateMessageCommand.class ) return false; return equals((KahaUpdateMessageCommand)obj); }
public void clear() { super.clear(); clearMessage(); }
return new KahaAckMessageFileMapCommand(); case KAHA_UPDATE_MESSAGE_COMMAND: return new KahaUpdateMessageCommand(); case KAHA_ADD_SCHEDULED_JOB_COMMAND: return new KahaAddScheduledJobCommand();
public static KahaUpdateMessageCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaUpdateMessageCommand().mergeFramed(data).checktInitialized(); }
public static KahaUpdateMessageCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { return new KahaUpdateMessageCommand().mergeUnframed(data).checktInitialized(); }
public KahaUpdateMessageCommand mergeFrom(KahaUpdateMessageCommand other) { if (other.hasMessage()) { if (hasMessage()) { getMessage().mergeFrom(other.getMessage()); } else { setMessage(other.getMessage().clone()); } } return this; }
public boolean equals(KahaUpdateMessageCommand obj) { if (hasMessage() ^ obj.hasMessage() ) return false; if (hasMessage() && ( !getMessage().equals(obj.getMessage()) )) return false; return true; }
public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { if (hasMessage()) { writeMessage(output, 1, getMessage()); } }
public int serializedSizeUnframed() { if (memoizedSerializedSize != -1) return memoizedSerializedSize; int size = 0; if (hasMessage()) { size += computeMessageSize(1, getMessage()); } memoizedSerializedSize = size; return size; }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasMessage() ) { missingFields.add("message"); } if( hasMessage() ) { try { getMessage().assertInitialized(); } catch (org.apache.activemq.protobuf.UninitializedMessageException e){ missingFields.addAll(prefix(e.getMissingFields(),"message.")); } } return missingFields; }