Class PersistenceRegisterer.Default
- java.lang.Object
-
- one.microstream.persistence.types.PersistenceRegisterer.Default
-
- All Implemented Interfaces:
PersistenceFunction
,PersistenceRegisterer
- Enclosing interface:
- PersistenceRegisterer
public static class PersistenceRegisterer.Default extends Object implements PersistenceRegisterer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PersistenceRegisterer.Default.Creator
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceRegisterer
PersistenceRegisterer.Default
-
-
Constructor Summary
Constructors Constructor Description Default(PersistenceObjectManager objectManager, PersistenceTypeHandlerManager<?> typeManager)
Default(PersistenceObjectManager objectManager, PersistenceTypeHandlerManager<?> typeManager, int hashRange)
-
Method Summary
Modifier and Type Method Description <T> long
apply(T instance)
Applies any action on the passed instance (e.g.: simply looking up its object ID or storing its state to a storage medium) and returns the object ID that identifies the passed instance.long
register(Object instance)
long[]
registerAll(Object... instances)
-
-
-
Constructor Detail
-
Default
public Default(PersistenceObjectManager objectManager, PersistenceTypeHandlerManager<?> typeManager)
-
Default
public Default(PersistenceObjectManager objectManager, PersistenceTypeHandlerManager<?> typeManager, int hashRange)
-
-
Method Detail
-
apply
public <T> long apply(T instance)
Description copied from interface:PersistenceFunction
Applies any action on the passed instance (e.g.: simply looking up its object ID or storing its state to a storage medium) and returns the object ID that identifies the passed instance. The returned OID may be the existing one for the passed instance or a newly associated one.- Specified by:
apply
in interfacePersistenceFunction
- Parameters:
instance
- the instance to which the function shall be applied.- Returns:
- the object ID (OID) that is associated with the passed instance.
-
register
public long register(Object instance)
- Specified by:
register
in interfacePersistenceRegisterer
-
registerAll
public long[] registerAll(Object... instances)
- Specified by:
registerAll
in interfacePersistenceRegisterer
-
-