Class AbstractHashMapPersister<K,V>

java.lang.Object
org.apache.activemq.artemis.core.journal.collections.AbstractHashMapPersister<K,V>
All Implemented Interfaces:
org.apache.activemq.artemis.core.persistence.Persister<JournalHashMap.MapRecord<K,V>>

public abstract class AbstractHashMapPersister<K,V> extends Object implements org.apache.activemq.artemis.core.persistence.Persister<JournalHashMap.MapRecord<K,V>>
  • Constructor Details

    • AbstractHashMapPersister

      public AbstractHashMapPersister()
  • Method Details

    • getID

      public byte getID()
      Specified by:
      getID in interface org.apache.activemq.artemis.core.persistence.Persister<K>
    • getEncodeSize

      public final int getEncodeSize(JournalHashMap.MapRecord<K,V> record)
      Specified by:
      getEncodeSize in interface org.apache.activemq.artemis.core.persistence.Persister<K>
    • getKeySize

      protected abstract int getKeySize(K key)
    • encodeKey

      protected abstract void encodeKey(ActiveMQBuffer buffer, K key)
    • decodeKey

      protected abstract K decodeKey(ActiveMQBuffer buffer)
    • getValueSize

      protected abstract int getValueSize(V value)
    • encodeValue

      protected abstract void encodeValue(ActiveMQBuffer buffer, V value)
    • decodeValue

      protected abstract V decodeValue(ActiveMQBuffer buffer, K key)
    • encode

      public final void encode(ActiveMQBuffer buffer, JournalHashMap.MapRecord<K,V> record)
      Specified by:
      encode in interface org.apache.activemq.artemis.core.persistence.Persister<K>
    • decode

      public final JournalHashMap.MapRecord<K,V> decode(ActiveMQBuffer buffer, JournalHashMap.MapRecord<K,V> record, org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools pool)
      Specified by:
      decode in interface org.apache.activemq.artemis.core.persistence.Persister<K>