Interface ObjectStoringStrategy


  • public interface ObjectStoringStrategy
    • Method Detail

      • accept

        boolean accept​(Object obj)
        Similar to ObjectMarshallingStrategy, it is used to decide whether this implementation is going to work for the given Object.
        Parameters:
        obj - a given object
        Returns:
        true if it can persist the given object.
      • persist

        Object persist​(Object persistable)
        Returns the key for the persisted object.
        Parameters:
        persistable - the object to persist.
        Returns:
        the key of the persisted object.
      • update

        Object update​(Object persistable)
        Returns the key for the persisted object.
        Parameters:
        persistable - the object to persist.
        Returns:
        the key of the persisted object.
      • read

        Object read​(Object key)
        Returns the persisted object.
        Parameters:
        key - the key of the persisted object.
        Returns:
        a persisted object or null.