Class JournalHashMap<K,V,C>
java.lang.Object
org.apache.activemq.artemis.core.journal.collections.JournalHashMap<K,V,C>
- All Implemented Interfaces:
Map<K,V>
K = Key
V = Value
C = Context
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionJournalHashMap(long collectionId, MapStorageManager journal, LongSupplier idGenerator, org.apache.activemq.artemis.core.persistence.Persister<JournalHashMap.MapRecord<K, V>> persister, byte recordType, Supplier<IOCompletion> completionSupplier, LongFunction<C> contextProvider, IOCriticalErrorListener ioExceptionListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Not implemented yet, you may use entrySetCoyvoidforEach(BiConsumer<? super K, ? super V> action) longbooleanisEmpty()keySet()voidvoidreload(JournalHashMap.MapRecord<K, V> reloadValue) This is to be called from a single thread during reload, no need to be synchronizedThis method will remove the element from the HashMap immediately however the record is still part of a transaction.setContext(C context) intsize()values()Not implemented yet, you may use valuesCopy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
JournalHashMap
public JournalHashMap(long collectionId, MapStorageManager journal, LongSupplier idGenerator, org.apache.activemq.artemis.core.persistence.Persister<JournalHashMap.MapRecord<K, V>> persister, byte recordType, Supplier<IOCompletion> completionSupplier, LongFunction<C> contextProvider, IOCriticalErrorListener ioExceptionListener)
-
-
Method Details
-
getCollectionId
public long getCollectionId() -
size
public int size() -
getContext
-
setContext
-
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
reload
This is to be called from a single thread during reload, no need to be synchronized -
put
-
remove
-
remove
This method will remove the element from the HashMap immediately however the record is still part of a transaction. This is not playing with rollbacks. So a rollback on the transaction wouldn't place the elements back. This is intended to make sure the operation would be atomic in case of a failure, while an appendRollback is not expected. -
putAll
-
clear
public void clear() -
keySet
-
values
Not implemented yet, you may use valuesCopy. -
valuesCopy
-
entrySet
Not implemented yet, you may use entrySetCoy -
entrySetCopy
-
forEach
-