public final class DefaultObjectRegistry extends Object implements PersistenceObjectRegistry
| Modifier and Type | Method and Description |
|---|---|
long |
capacity() |
void |
clear()
Clears all entries except those that are essential for a correctly executed program (e.g.
|
void |
clearAll()
Clears all entries, including those that are essential for a correctly executed program (e.g.
|
DefaultObjectRegistry |
Clone()
Useful for
PersistenceContextDispatcher. |
boolean |
consolidate()
Consolidate internal data structures, e.g.
|
boolean |
containsObjectId(long objectId) |
one.microstream.collections.types.XGettingTable<String,one.microstream.hashing.HashStatisticsBucketBased> |
createHashStatistics() |
static float |
defaultHashDensity() |
boolean |
ensureCapacity(long desiredCapacity)
Makes sure the internal storage structure is prepared to provide a
PersistenceObjectRegistry.capacity() of at least
the passed capacity value. |
float |
hashDensity() |
int |
hashRange() |
boolean |
isEmpty() |
boolean |
isValid(long objectId,
Object object) |
static boolean |
isValidCapacity(long desiredCapacity) |
static boolean |
isValidHashDensity(float desiredHashDensity) |
<A extends PersistenceAcceptor> |
iterateEntries(A acceptor) |
Object |
lookupObject(long objectId) |
long |
lookupObjectId(Object object) |
long |
minimumCapacity() |
static DefaultObjectRegistry |
New() |
static DefaultObjectRegistry |
New(float hashDensity) |
static DefaultObjectRegistry |
New(float hashDensity,
long minimumCapacity) |
static DefaultObjectRegistry |
New(long minimumCapacity) |
Object |
optionalRegisterObject(long objectId,
Object object) |
static void |
printEntryInstanceSizeInfo() |
boolean |
registerConstant(long objectId,
Object constant) |
boolean |
registerObject(long objectId,
Object object) |
boolean |
setConfiguration(float hashDensity,
long minimumCapacity) |
boolean |
setHashDensity(float hashDensity) |
boolean |
setMinimumCapacity(long minimumCapacity) |
long |
size() |
void |
truncate()
Truncates all entries except those that are essential for a correctly executed program (e.g.
|
void |
truncateAll()
Truncates all entries, including those that are essential for a correctly executed program (e.g.
|
void |
validate(long objectId,
Object object) |
static long |
validateCapacity(long desiredCapacity) |
static float |
validateHashDensity(float desiredHashDensity) |
public static final float defaultHashDensity()
public static final boolean isValidHashDensity(float desiredHashDensity)
public static final float validateHashDensity(float desiredHashDensity)
public static final boolean isValidCapacity(long desiredCapacity)
public static final long validateCapacity(long desiredCapacity)
public static DefaultObjectRegistry New()
New in interface PersistenceObjectRegistrypublic static DefaultObjectRegistry New(long minimumCapacity)
public static DefaultObjectRegistry New(float hashDensity)
public static DefaultObjectRegistry New(float hashDensity, long minimumCapacity)
hashDensity - reasonable values are within [0.75; 2.00].minimumCapacity - the initial minimum capacityDefaultObjectRegistrypublic final DefaultObjectRegistry Clone()
PersistenceObjectRegistryPersistenceContextDispatcher.Clone in interface PersistenceObjectRegistryClone in interface one.microstream.util.Cloneable<PersistenceObjectRegistry>Cloneable.public final int hashRange()
hashRange in interface PersistenceObjectRegistrypublic final float hashDensity()
hashDensity in interface PersistenceObjectRegistrypublic final long minimumCapacity()
minimumCapacity in interface PersistenceObjectRegistrypublic final long capacity()
capacity in interface PersistenceObjectRegistrypublic final long size()
size in interface PersistenceObjectRegistrypublic final boolean isEmpty()
isEmpty in interface PersistenceObjectRegistrypublic final boolean setHashDensity(float hashDensity)
setHashDensity in interface PersistenceObjectRegistrypublic final boolean setConfiguration(float hashDensity,
long minimumCapacity)
setConfiguration in interface PersistenceObjectRegistrypublic final boolean setMinimumCapacity(long minimumCapacity)
setMinimumCapacity in interface PersistenceObjectRegistrypublic final boolean ensureCapacity(long desiredCapacity)
PersistenceObjectRegistryPersistenceObjectRegistry.capacity() of at least
the passed capacity value.ensureCapacity in interface PersistenceObjectRegistrydesiredCapacity - the new minimum capacitypublic final boolean containsObjectId(long objectId)
containsObjectId in interface PersistenceObjectRegistrypublic final long lookupObjectId(Object object)
lookupObjectId in interface PersistenceObjectIdLookuplookupObjectId in interface PersistenceObjectRegistrypublic final Object lookupObject(long objectId)
lookupObject in interface PersistenceObjectLookuplookupObject in interface PersistenceObjectRegistrypublic final boolean isValid(long objectId,
Object object)
isValid in interface PersistenceObjectRegistrypublic final void validate(long objectId,
Object object)
validate in interface PersistenceObjectRegistrypublic final boolean registerObject(long objectId,
Object object)
registerObject in interface PersistenceObjectRegistrypublic final Object optionalRegisterObject(long objectId, Object object)
optionalRegisterObject in interface PersistenceObjectRegistrypublic final boolean registerConstant(long objectId,
Object constant)
registerConstant in interface PersistenceObjectRegistrypublic final <A extends PersistenceAcceptor> A iterateEntries(A acceptor)
iterateEntries in interface PersistenceObjectRegistrypublic final boolean consolidate()
PersistenceObjectRegistryconsolidate in interface PersistenceObjectRegistrypublic final void clear()
PersistenceObjectRegistry
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.
clear in interface PersistenceObjectRegistrypublic final void clearAll()
PersistenceObjectRegistry
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.
clearAll in interface PersistenceObjectRegistrypublic final void truncate()
PersistenceObjectRegistry
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.
truncate in interface PersistenceObjectRegistrypublic final void truncateAll()
PersistenceObjectRegistry
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.
truncateAll in interface PersistenceObjectRegistrypublic final one.microstream.collections.types.XGettingTable<String,one.microstream.hashing.HashStatisticsBucketBased> createHashStatistics()
createHashStatistics in interface PersistenceObjectRegistrypublic static final void printEntryInstanceSizeInfo()
Copyright © 2022 MicroStream Software. All rights reserved.