Package com.exedio.cope.vault
Class VaultFileService
java.lang.Object
com.exedio.cope.vault.VaultFileService
- All Implemented Interfaces:
VaultService,AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]voidget(String hash, OutputStream sink) longbooleanput(String hash, byte[] value, VaultPutInfo info) Is not called, if service instance was created withVaultServiceParameters.isWritable()==false.booleanput(String hash, InputStream value, VaultPutInfo info) Is not called, if service instance was created withVaultServiceParameters.isWritable()==false.booleanput(String hash, Path value, VaultPutInfo info) The caller must make sure, thatvalueis not modified during the call.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.exedio.cope.vault.VaultService
close, purgeSchema
-
Method Details
-
getLength
- Specified by:
getLengthin interfaceVaultService- Throws:
VaultNotFoundException
-
get
- Specified by:
getin interfaceVaultService- Throws:
VaultNotFoundException
-
get
Description copied from interface:VaultServiceMust notcloseorflushsink.If this method throws a
VaultNotFoundException, it MUST not have modifiedsinkin any way. In particular it must not have written any byte tosink.- Specified by:
getin interfaceVaultService- Throws:
VaultNotFoundExceptionIOException
-
put
Description copied from interface:VaultServiceIs not called, if service instance was created withVaultServiceParameters.isWritable()==false.- Specified by:
putin interfaceVaultService- Returns:
trueifhashhas been initially stored in the vault by this call. The result is used for statistics only. If the implementation does not have this information available, simply returntrue.
-
put
Description copied from interface:VaultServiceIs not called, if service instance was created withVaultServiceParameters.isWritable()==false.- Specified by:
putin interfaceVaultService- Returns:
trueifhashhas been initially stored in the vault by this call. The result is used for statistics only. If the implementation does not have this information available, simply returntrue.- Throws:
IOException
-
put
Description copied from interface:VaultServiceThe caller must make sure, thatvalueis not modified during the call. Is not called, if service instance was created withVaultServiceParameters.isWritable()==false.- Specified by:
putin interfaceVaultService- Returns:
trueifhashhas been initially stored in the vault by this call. The result is used for statistics only. If the implementation does not have this information available, simply returntrue.- Throws:
IOException
-
toString
-