Package org.deltafi.common.storage.s3
Interface ObjectStorageService
-
- All Known Implementing Classes:
MinioObjectStorageService
public interface ObjectStorageService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.io.InputStreamgetObject(ObjectReference objectReference)default byte[]getObjectAsByteArray(ObjectReference objectReference)ObjectReferenceputObject(ObjectReference objectReference, java.io.InputStream inputStream)default ObjectReferenceputObjectAsByteArray(ObjectReference objectReference, byte[] object)voidputObjects(java.lang.String bucket, java.util.Map<ObjectReference,java.io.InputStream> objectsToSave)Writes the InputStream to object storage for each ObjectReferencevoidremoveObject(ObjectReference objectReference)booleanremoveObjects(java.lang.String bucket, java.util.List<java.lang.String> objectNames)
-
-
-
Method Detail
-
getObject
java.io.InputStream getObject(ObjectReference objectReference) throws ObjectStorageException
- Throws:
ObjectStorageException
-
getObjectAsByteArray
default byte[] getObjectAsByteArray(ObjectReference objectReference) throws ObjectStorageException, java.io.IOException
- Throws:
ObjectStorageExceptionjava.io.IOException
-
putObject
ObjectReference putObject(ObjectReference objectReference, java.io.InputStream inputStream) throws ObjectStorageException
- Throws:
ObjectStorageException
-
putObjects
void putObjects(java.lang.String bucket, java.util.Map<ObjectReference,java.io.InputStream> objectsToSave) throws ObjectStorageExceptionWrites the InputStream to object storage for each ObjectReference- Parameters:
bucket- where each ObjectReference should be storedobjectsToSave- map of the object references to the content input stream- Throws:
ObjectStorageException- when storing the objects fails
-
putObjectAsByteArray
default ObjectReference putObjectAsByteArray(ObjectReference objectReference, byte[] object) throws ObjectStorageException
- Throws:
ObjectStorageException
-
removeObject
void removeObject(ObjectReference objectReference)
-
removeObjects
boolean removeObjects(java.lang.String bucket, java.util.List<java.lang.String> objectNames)
-
-