Class AbstractHashMapPersister<K,V>
java.lang.Object
org.apache.activemq.artemis.core.journal.collections.AbstractHashMapPersister<K,V>
- All Implemented Interfaces:
Persister<JournalHashMap.MapRecord<K,V>>
- Direct Known Subclasses:
AckRetry.Persister
public abstract class AbstractHashMapPersister<K,V>
extends Object
implements Persister<JournalHashMap.MapRecord<K,V>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal JournalHashMap.MapRecord<K,V> decode(ActiveMQBuffer buffer, JournalHashMap.MapRecord<K, V> record, CoreMessageObjectPools pool) protected abstract KdecodeKey(ActiveMQBuffer buffer) protected abstract VdecodeValue(ActiveMQBuffer buffer, K key) final voidencode(ActiveMQBuffer buffer, JournalHashMap.MapRecord<K, V> record) protected abstract voidencodeKey(ActiveMQBuffer buffer, K key) protected abstract voidencodeValue(ActiveMQBuffer buffer, V value) final intgetEncodeSize(JournalHashMap.MapRecord<K, V> record) bytegetID()This is to be used to store the protocol-id on Messages.protected abstract intgetKeySize(K key) protected abstract intgetValueSize(V value)
-
Constructor Details
-
AbstractHashMapPersister
public AbstractHashMapPersister()
-
-
Method Details
-
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. -
getEncodeSize
- Specified by:
getEncodeSizein interfacePersister<K>
-
getKeySize
-
encodeKey
-
decodeKey
-
getValueSize
-
encodeValue
-
decodeValue
-
encode
-
decode
public final JournalHashMap.MapRecord<K,V> decode(ActiveMQBuffer buffer, JournalHashMap.MapRecord<K, V> record, CoreMessageObjectPools pool)
-