Class EncoderPersister
- java.lang.Object
-
- org.apache.activemq.artemis.core.journal.EncoderPersister
-
- All Implemented Interfaces:
Persister<EncodingSupport>
public class EncoderPersister extends Object implements Persister<EncodingSupport>
This is a facade between the new Persister and the former EncodingSupport. Methods using the old interface will use this as a facade to provide the previous semantic.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EncodingSupportdecode(ActiveMQBuffer buffer, EncodingSupport record, CoreMessageObjectPools pools)voidencode(ActiveMQBuffer buffer, EncodingSupport record)intgetEncodeSize(EncodingSupport record)bytegetID()This is to be used to store the protocol-id on Messages.static EncoderPersistergetInstance()
-
-
-
Method Detail
-
getID
public byte getID()
Description copied from interface:PersisterThis 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:
getIDin interfacePersister<EncodingSupport>
-
getInstance
public static EncoderPersister getInstance()
-
getEncodeSize
public int getEncodeSize(EncodingSupport record)
- Specified by:
getEncodeSizein interfacePersister<EncodingSupport>
-
encode
public void encode(ActiveMQBuffer buffer, EncodingSupport record)
- Specified by:
encodein interfacePersister<EncodingSupport>
-
decode
public EncodingSupport decode(ActiveMQBuffer buffer, EncodingSupport record, CoreMessageObjectPools pools)
- Specified by:
decodein interfacePersister<EncodingSupport>
-
-