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[]
void
get
(String hash, OutputStream sink) long
boolean
put
(String hash, byte[] value, VaultPutInfo info) Is not called, if service instance was created withVaultServiceParameters.isWritable()
==false.boolean
put
(String hash, InputStream value, VaultPutInfo info) Is not called, if service instance was created withVaultServiceParameters.isWritable()
==false.boolean
put
(String hash, Path value, VaultPutInfo info) The caller must make sure, thatvalue
is not modified during the call.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.exedio.cope.vault.VaultService
close, purgeSchema
-
Method Details
-
getLength
- Specified by:
getLength
in interfaceVaultService
- Throws:
VaultNotFoundException
-
get
- Specified by:
get
in interfaceVaultService
- Throws:
VaultNotFoundException
-
get
Description copied from interface:VaultService
Must notclose
orflush
sink
.If this method throws a
VaultNotFoundException
, it MUST not have modifiedsink
in any way. In particular it must not have written any byte tosink
.- Specified by:
get
in interfaceVaultService
- Throws:
VaultNotFoundException
IOException
-
put
Description copied from interface:VaultService
Is not called, if service instance was created withVaultServiceParameters.isWritable()
==false.- Specified by:
put
in interfaceVaultService
- Returns:
true
ifhash
has 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:VaultService
Is not called, if service instance was created withVaultServiceParameters.isWritable()
==false.- Specified by:
put
in interfaceVaultService
- Returns:
true
ifhash
has 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:VaultService
The caller must make sure, thatvalue
is not modified during the call. Is not called, if service instance was created withVaultServiceParameters.isWritable()
==false.- Specified by:
put
in interfaceVaultService
- Returns:
true
ifhash
has 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
-