Class VersionedMapStateImpl<K,V>
java.lang.Object
tools.refinery.store.map.internal.state.VersionedMapStateImpl<K,V>
- Type Parameters:
K-V-
- All Implemented Interfaces:
AnyVersionedMap, Versioned, VersionedMap<K,V>
Not threadSafe in itself
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Vprotected final ContinuousHashProvider<K> protected final VersionedMapStoreStateImpl<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionVersionedMapStateImpl(VersionedMapStoreStateImpl<K, V> store, ContinuousHashProvider<K> hashProvider, V defaultValue) VersionedMapStateImpl(VersionedMapStoreStateImpl<K, V> store, ContinuousHashProvider<K> hashProvider, V defaultValue, Node<K, V> data) -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks the integrity of the map, and throws an exception if an inconsistency is detected.commit()Saves the state of the object.booleancontentEquals(AnyVersionedMap other) intgetAll()DiffCursor<K, V> getDiffCursor(Version toVersion) DiffCursor<K, V> getDiffCursor(Version state, boolean consolidate) longgetSize()voidvoidRestores the state of the object.voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AnyVersionedMap
equals, hashCode
-
Field Details
-
store
-
hashProvider
-
defaultValue
-
root
-
-
Constructor Details
-
VersionedMapStateImpl
public VersionedMapStateImpl(VersionedMapStoreStateImpl<K, V> store, ContinuousHashProvider<K> hashProvider, V defaultValue) -
VersionedMapStateImpl
public VersionedMapStateImpl(VersionedMapStoreStateImpl<K, V> store, ContinuousHashProvider<K> hashProvider, V defaultValue, Node<K, V> data)
-
-
Method Details
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceVersionedMap<K,V>
-
getHashProvider
-
put
-
putAll
-
get
-
getSize
public long getSize()- Specified by:
getSizein interfaceAnyVersionedMap
-
getAll
-
getDiffCursor
- Specified by:
getDiffCursorin interfaceVersionedMap<K,V>
-
getDiffCursor
- Specified by:
getDiffCursorin interfaceVersionedMap<K,V>
-
commit
-
setRoot
-
restore
-
prettyPrint
-
checkIntegrity
public void checkIntegrity()Description copied from interface:AnyVersionedMapChecks the integrity of the map, and throws an exception if an inconsistency is detected.- Specified by:
checkIntegrityin interfaceAnyVersionedMap
-
contentHashCode
- Specified by:
contentHashCodein interfaceAnyVersionedMap
-
contentEquals
- Specified by:
contentEqualsin interfaceAnyVersionedMap
-