Package org.fcrepo.storage.ocfl
Interface OcflObjectSessionFactory
- All Known Implementing Classes:
DefaultOcflObjectSessionFactory
public interface OcflObjectSessionFactory
Factory for creating OcflObjectSessions.
- Author:
- pwinckles
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the underlying OCFL repository.newSession(String ocflObjectId) Creates a new OCFL object session for the specified OCFL object.voiduseUnsafeWrite(boolean useUnsafeWrite) When unsafe writes are enabled, files are added to OCFL versions by providing the OCFL client with their digest.
-
Method Details
-
newSession
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
-