Interface PersistenceStoreHandler<D>

All Superinterfaces:
PersistenceFunction
All Known Implementing Classes:
BinaryStorer.Default, BinaryStorer.Eager

public interface PersistenceStoreHandler<D>
extends PersistenceFunction
  • Method Summary

    Modifier and Type Method Description
    <T> long apply​(T instance)
    The "natural" way of handling an instance as defined by the implementation.
    <T> long apply​(T instance, PersistenceTypeHandler<D,​T> localTypeHandler)  
    <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.
    <T> long applyEager​(T instance, PersistenceTypeHandler<D,​T> localTypeHandler)  
    ObjectSwizzling getObjectRetriever()  
  • Method Details

    • apply

      <T> long apply​(T instance)
      The "natural" way of handling an instance as defined by the implementation.
      Specified by:
      apply in interface PersistenceFunction
      Type Parameters:
      T - the type of the instance
      Parameters:
      instance - the instance to store
      Returns:
      the assigned object id
    • 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.
      Type Parameters:
      T - the type of the instance
      Parameters:
      instance - the instance to store
      Returns:
      the assigned object id
    • apply

      <T> long apply​(T instance, PersistenceTypeHandler<D,​T> localTypeHandler)
    • applyEager

      <T> long applyEager​(T instance, PersistenceTypeHandler<D,​T> localTypeHandler)
    • getObjectRetriever

      ObjectSwizzling getObjectRetriever()