Interface PersistenceStoreHandler
-
- All Superinterfaces:
PersistenceFunction
- All Known Implementing Classes:
BinaryStorer.Default,BinaryStorer.Eager
public interface PersistenceStoreHandler extends PersistenceFunction
-
-
Method Summary
Modifier and Type Method Description <T> longapply(T instance)The "natural" way of handling an instance as defined by the implementation.<T> longapplyEager(T instance)A way to signal to the implementation that the passed instance is supposed to be handled eagerly, meaning it shall be handled even if the handling implementation does not deem it necessary.
This is needed, for example, to store composition pattern instances without breaking OOP encapsulation concepts.ObjectSwizzlinggetObjectRetriever()
-
-
-
Method Detail
-
apply
<T> long apply(T instance)
The "natural" way of handling an instance as defined by the implementation.- Specified by:
applyin interfacePersistenceFunction- Parameters:
instance- the instance to which the function shall be applied.- Returns:
- the object ID (OID) that is associated with the passed instance.
-
applyEager
<T> long applyEager(T instance)
A way to signal to the implementation that the passed instance is supposed to be handled eagerly, meaning it shall be handled even if the handling implementation does not deem it necessary.
This is needed, for example, to store composition pattern instances without breaking OOP encapsulation concepts.
-
getObjectRetriever
ObjectSwizzling getObjectRetriever()
-
-