Class MessagePersister
java.lang.Object
org.apache.activemq.artemis.spi.core.protocol.MessagePersister
- All Implemented Interfaces:
org.apache.activemq.artemis.core.persistence.Persister<Message>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
decode
(ActiveMQBuffer buffer, Message record, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools pools) decode
(ActiveMQBuffer buffer, Message record, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools pools, org.apache.activemq.artemis.core.persistence.StorageManager storageManager) void
encode
(ActiveMQBuffer buffer, Message record) Sub classes must add the first short as the protocol-idint
getEncodeSize
(Message record) byte
getID()
This is to be used to store the protocol-id on Messages.static MessagePersister
static org.apache.activemq.artemis.core.persistence.Persister
getPersister
(byte id) static void
registerPersister
(org.apache.activemq.artemis.core.persistence.Persister<Message> persister) static void
registerProtocol
(ProtocolManagerFactory manager)
-
Constructor Details
-
MessagePersister
protected MessagePersister()
-
-
Method Details
-
getID
public byte getID()Description copied from interface:org.apache.activemq.artemis.core.persistence.Persister
This is to be used to store the protocol-id on Messages. Messages are stored on their bare format. The protocol manager will be responsible to code or decode messages. The caveat here is that the first short-sized bytes need to be this constant.- Specified by:
getID
in interfaceorg.apache.activemq.artemis.core.persistence.Persister<Message>
-
registerProtocol
-
clearPersisters
public static void clearPersisters() -
getPersister
public static org.apache.activemq.artemis.core.persistence.Persister getPersister(byte id) -
registerPersister
public static void registerPersister(org.apache.activemq.artemis.core.persistence.Persister<Message> persister) -
getInstance
-
getEncodeSize
- Specified by:
getEncodeSize
in interfaceorg.apache.activemq.artemis.core.persistence.Persister<Message>
-
encode
Sub classes must add the first short as the protocol-id- Specified by:
encode
in interfaceorg.apache.activemq.artemis.core.persistence.Persister<Message>
-
decode
public Message decode(ActiveMQBuffer buffer, Message record, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools pools) - Specified by:
decode
in interfaceorg.apache.activemq.artemis.core.persistence.Persister<Message>
-
decode
public Message decode(ActiveMQBuffer buffer, Message record, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools pools, org.apache.activemq.artemis.core.persistence.StorageManager storageManager)
-