Interface OcflObjectSessionFactory

  • All Known Implementing Classes:
    DefaultOcflObjectSessionFactory

    public interface OcflObjectSessionFactory
    Factory for creating OcflObjectSessions.
    Author:
    pwinckles
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Closes the underlying OCFL repository.
      OcflObjectSession newSession​(String ocflObjectId)
      Creates a new OCFL object session for the specified OCFL object.
      void useUnsafeWrite​(boolean useUnsafeWrite)
      When unsafe writes are enabled, files are added to OCFL versions by providing the OCFL client with their digest.
    • Method Detail

      • newSession

        OcflObjectSession newSession​(String ocflObjectId)
        Creates a new OCFL object session for the specified OCFL object.
        Parameters:
        ocflObjectId - the OCFL object id to open a session for
        Returns:
        new session
      • close

        void close()
        Closes the underlying OCFL repository.
      • useUnsafeWrite

        void useUnsafeWrite​(boolean useUnsafeWrite)
        When unsafe writes are enabled, files are added to OCFL versions by providing the OCFL client with their digest. The client trusts that the digest is accurate and does not calculate the value for itself. This should increase performance, but will corrupt the object if the digest is incorrect.
        Parameters:
        useUnsafeWrite - true to use unsafe OCFL writes