Package org.apache.activemq.command
Class MessageId
- java.lang.Object
-
- org.apache.activemq.command.MessageId
-
- All Implemented Interfaces:
Comparable<MessageId>,DataStructure
public class MessageId extends Object implements DataStructure, Comparable<MessageId>
-
-
Field Summary
Fields Modifier and Type Field Description protected longbrokerSequenceIdstatic byteDATA_STRUCTURE_TYPEprotected ProducerIdproducerIdprotected longproducerSequenceIdprotected StringtextView
-
Constructor Summary
Constructors Constructor Description MessageId()MessageId(String messageKey)MessageId(String producerId, long producerSequenceId)MessageId(ProducerId producerId, long producerSequenceId)MessageId(ProducerInfo producerInfo, long producerSequenceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(MessageId other)MessageIdcopy()booleanequals(Object o)longgetBrokerSequenceId()ObjectgetDataLocator()bytegetDataStructureType()ObjectgetEntryLocator()ObjectgetFutureOrSequenceLong()ObjectgetPlistLocator()ProducerIdgetProducerId()longgetProducerSequenceId()StringgetTextView()inthashCode()booleanisMarshallAware()voidsetBrokerSequenceId(long brokerSequenceId)voidsetDataLocator(Object value)Sets a locator which aids a message store in loading a message faster.voidsetEntryLocator(Object entryLocator)voidsetFutureOrSequenceLong(Object futureOrSequenceLong)voidsetPlistLocator(Object plistLocator)voidsetProducerId(ProducerId producerId)voidsetProducerSequenceId(long producerSequenceId)voidsetTextView(String key)Sets the transient text view of the message which will be ignored if the message is marshaled on a transport; so is only for in-JVM changes to accommodate foreign JMS message IDsvoidsetValue(String messageKey)Sets the value as a StringStringtoProducerKey()StringtoString()
-
-
-
Field Detail
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
-
textView
protected String textView
-
producerId
protected ProducerId producerId
-
producerSequenceId
protected long producerSequenceId
-
brokerSequenceId
protected long brokerSequenceId
-
-
Constructor Detail
-
MessageId
public MessageId()
-
MessageId
public MessageId(ProducerInfo producerInfo, long producerSequenceId)
-
MessageId
public MessageId(String messageKey)
-
MessageId
public MessageId(String producerId, long producerSequenceId)
-
MessageId
public MessageId(ProducerId producerId, long producerSequenceId)
-
-
Method Detail
-
setValue
public void setValue(String messageKey)
Sets the value as a String
-
setTextView
public void setTextView(String key)
Sets the transient text view of the message which will be ignored if the message is marshaled on a transport; so is only for in-JVM changes to accommodate foreign JMS message IDs
-
getTextView
public String getTextView()
- Returns:
-
getDataStructureType
public byte getDataStructureType()
- Specified by:
getDataStructureTypein interfaceDataStructure- Returns:
- The type of the data structure
-
toProducerKey
public String toProducerKey()
-
getProducerId
public ProducerId getProducerId()
-
setProducerId
public void setProducerId(ProducerId producerId)
-
getProducerSequenceId
public long getProducerSequenceId()
-
setProducerSequenceId
public void setProducerSequenceId(long producerSequenceId)
-
getBrokerSequenceId
public long getBrokerSequenceId()
-
setBrokerSequenceId
public void setBrokerSequenceId(long brokerSequenceId)
-
isMarshallAware
public boolean isMarshallAware()
- Specified by:
isMarshallAwarein interfaceDataStructure
-
copy
public MessageId copy()
-
compareTo
public int compareTo(MessageId other)
- Specified by:
compareToin interfaceComparable<MessageId>- Returns:
- See Also:
Comparable.compareTo(java.lang.Object)
-
getDataLocator
public Object getDataLocator()
- Returns:
- a locator which aids a message store in loading a message faster. Only used by the message stores.
-
setDataLocator
public void setDataLocator(Object value)
Sets a locator which aids a message store in loading a message faster. Only used by the message stores.
-
getFutureOrSequenceLong
public Object getFutureOrSequenceLong()
-
setFutureOrSequenceLong
public void setFutureOrSequenceLong(Object futureOrSequenceLong)
-
getEntryLocator
public Object getEntryLocator()
-
setEntryLocator
public void setEntryLocator(Object entryLocator)
-
getPlistLocator
public Object getPlistLocator()
-
setPlistLocator
public void setPlistLocator(Object plistLocator)
-
-