Package com.exedio.cope.vault
Class VaultReferenceService
java.lang.Object
com.exedio.cope.vault.VaultReferenceService
- All Implemented Interfaces:
VaultService,AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Overrides method fromAutoCloseableto add empty default implementation.byte[]voidget(String hash, OutputStream sink) longvoidpurgeSchema(JobContext ctx) Gives this service the chance to purge / cleanup whatever it needs to.booleanput(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()
-
Method Details
-
purgeSchema
Description copied from interface:VaultServiceGives this service the chance to purge / cleanup whatever it needs to. Is called byModel.purgeSchema(JobContext). The default implementation does nothing.- Specified by:
purgeSchemain interfaceVaultService
-
close
public void close()Description copied from interface:VaultServiceOverrides method fromAutoCloseableto add empty default implementation. Also requires implementations not to declare any checked exception to be thrown.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceVaultService
-
getMainService
-
getReferenceService
-
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
-