Class ViewerObjectRegistryDisabled
java.lang.Object
one.microstream.storage.restadapter.ViewerObjectRegistryDisabled
- All Implemented Interfaces:
PersistenceObjectIdLookup,PersistenceObjectLookup,PersistenceObjectRegistry,PersistenceSwizzlingLookup,Cloneable<PersistenceObjectRegistry>
public class ViewerObjectRegistryDisabled extends Object implements PersistenceObjectRegistry
Implements a disabled
PersistenceObjectRegistry.-
Constructor Summary
Constructors Constructor Description ViewerObjectRegistryDisabled() -
Method Summary
Modifier and Type Method Description longcapacity()Returns the current size potential before a (maybe costly) rebuild becomes necessary.voidclear()Clears all entries except those that are essential for a correctly executed program (e.g.voidclearAll()Clears all entries, including those that are essential for a correctly executed program (e.g.PersistenceObjectRegistryClone()Useful forPersistenceContextDispatcher.booleanconsolidate()Consolidate internal data structures, e.g.booleancontainsObjectId(long objectId)XGettingTable<String,? extends HashStatistics>createHashStatistics()booleanensureCapacity(long capacity)Makes sure the internal storage structure is prepared to provide aPersistenceObjectRegistry.capacity()of at least the passed capacity value.floathashDensity()inthashRange()booleanisEmpty()booleanisValid(long objectId, Object object)<A extends PersistenceAcceptor>
AiterateEntries(A acceptor)ObjectlookupObject(long objectId)longlookupObjectId(Object object)longminimumCapacity()ObjectoptionalRegisterObject(long objectId, Object object)booleanregisterConstant(long objectId, Object constant)booleanregisterObject(long objectId, Object object)booleansetConfiguration(float hashDensity, long minimumCapacity)booleansetHashDensity(float hashDensity)booleansetMinimumCapacity(long minimumCapacity)longsize()voidtruncate()Truncates all entries except those that are essential for a correctly executed program (e.g.voidtruncateAll()Truncates all entries, including those that are essential for a correctly executed program (e.g.voidvalidate(long objectId, Object object)
-
Constructor Details
-
ViewerObjectRegistryDisabled
public ViewerObjectRegistryDisabled()
-
-
Method Details
-
Clone
Description copied from interface:PersistenceObjectRegistryUseful forPersistenceContextDispatcher.- Specified by:
Clonein interfaceCloneable<PersistenceObjectRegistry>- Specified by:
Clonein interfacePersistenceObjectRegistry- Returns:
- A Clone of this instance as described in
Cloneable.
-
lookupObjectId
- Specified by:
lookupObjectIdin interfacePersistenceObjectIdLookup- Specified by:
lookupObjectIdin interfacePersistenceObjectRegistry
-
lookupObject
- Specified by:
lookupObjectin interfacePersistenceObjectLookup- Specified by:
lookupObjectin interfacePersistenceObjectRegistry
-
containsObjectId
public boolean containsObjectId(long objectId)- Specified by:
containsObjectIdin interfacePersistenceObjectRegistry
-
iterateEntries
- Specified by:
iterateEntriesin interfacePersistenceObjectRegistry
-
size
public long size()- Specified by:
sizein interfacePersistenceObjectRegistry
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePersistenceObjectRegistry
-
hashRange
public int hashRange()- Specified by:
hashRangein interfacePersistenceObjectRegistry
-
hashDensity
public float hashDensity()- Specified by:
hashDensityin interfacePersistenceObjectRegistry
-
minimumCapacity
public long minimumCapacity()- Specified by:
minimumCapacityin interfacePersistenceObjectRegistry
-
capacity
public long capacity()Description copied from interface:PersistenceObjectRegistryReturns the current size potential before a (maybe costly) rebuild becomes necessary.- Specified by:
capacityin interfacePersistenceObjectRegistry
-
setHashDensity
public boolean setHashDensity(float hashDensity)- Specified by:
setHashDensityin interfacePersistenceObjectRegistry
-
setMinimumCapacity
public boolean setMinimumCapacity(long minimumCapacity)- Specified by:
setMinimumCapacityin interfacePersistenceObjectRegistry
-
setConfiguration
public boolean setConfiguration(float hashDensity, long minimumCapacity)- Specified by:
setConfigurationin interfacePersistenceObjectRegistry
-
ensureCapacity
public boolean ensureCapacity(long capacity)Description copied from interface:PersistenceObjectRegistryMakes sure the internal storage structure is prepared to provide aPersistenceObjectRegistry.capacity()of at least the passed capacity value.- Specified by:
ensureCapacityin interfacePersistenceObjectRegistry- Returns:
- whether a rebuild of internal storage structures was necessary.
-
registerObject
- Specified by:
registerObjectin interfacePersistenceObjectRegistry
-
optionalRegisterObject
- Specified by:
optionalRegisterObjectin interfacePersistenceObjectRegistry
-
registerConstant
- Specified by:
registerConstantin interfacePersistenceObjectRegistry
-
consolidate
public boolean consolidate()Description copied from interface:PersistenceObjectRegistryConsolidate internal data structures, e.g. by removing orphan entries and empty hash chains. Depending on the implementation and the size of the registry, this can take a considerable amount of time.- Specified by:
consolidatein interfacePersistenceObjectRegistry- Returns:
- whether a rebuild was required.
-
clear
public void clear()Description copied from interface:PersistenceObjectRegistryClears all entries except those that are essential for a correctly executed program (e.g. constants).
Clearing means to leave the current capacity as it is and just to actually clear its entries.NOTE:
This method is currently only intended to be used for testing since calling it can cause inconsistencies if there still exist uncleared lazy references.- Specified by:
clearin interfacePersistenceObjectRegistry
-
clearAll
public void clearAll()Description copied from interface:PersistenceObjectRegistryClears all entries, including those that are essential for a correctly executed program (e.g. constants), effectively leaving a completely empty registry.
Clearing means to leave the current capacity as it is and just to actually clear its entries.NOTE:
This method is currently only intended to be used for testing since calling it can cause inconsistencies if there still exist uncleared lazy references.- Specified by:
clearAllin interfacePersistenceObjectRegistry
-
truncate
public void truncate()Description copied from interface:PersistenceObjectRegistryTruncates all entries except those that are essential for a correctly executed program (e.g. constants). Truncating means to quickly empty the registry by reinitializing the internal storage structures with a new and minimal capacity.NOTE:
This method is currently only intended to be used for testing since calling it can cause inconsistencies if there still exist uncleared lazy references.- Specified by:
truncatein interfacePersistenceObjectRegistry
-
truncateAll
public void truncateAll()Description copied from interface:PersistenceObjectRegistryTruncates all entries, including those that are essential for a correctly executed program (e.g. constants), effectively leaving a completely empty registry.
Truncating means to quickly empty the registry by reinitializing the internal storage structures with a new and minimal capacity.NOTE:
This method is currently only intended to be used for testing since calling it can cause inconsistencies if there still exist uncleared lazy references.- Specified by:
truncateAllin interfacePersistenceObjectRegistry
-
createHashStatistics
- Specified by:
createHashStatisticsin interfacePersistenceObjectRegistry
-
isValid
- Specified by:
isValidin interfacePersistenceObjectRegistry
-
validate
- Specified by:
validatein interfacePersistenceObjectRegistry
-