Package org.deltafi.common.storage.s3
Interface ObjectStorageService
- All Known Implementing Classes:
MinioObjectStorageService
public interface ObjectStorageService
-
Method Summary
Modifier and TypeMethodDescriptiongetObject(ObjectReference objectReference) default byte[]getObjectAsByteArray(ObjectReference objectReference) putObject(ObjectReference objectReference, InputStream inputStream) default ObjectReferenceputObjectAsByteArray(ObjectReference objectReference, byte[] object) voidputObjects(String bucket, Map<ObjectReference, InputStream> objectsToSave) Writes the InputStream to object storage for each ObjectReferencevoidremoveObject(ObjectReference objectReference) booleanremoveObjects(String bucket, List<String> objectNames)
-
Method Details
-
getObject
- Throws:
ObjectStorageException
-
getObjectAsByteArray
default byte[] getObjectAsByteArray(ObjectReference objectReference) throws ObjectStorageException, IOException - Throws:
ObjectStorageExceptionIOException
-
putObject
ObjectReference putObject(ObjectReference objectReference, InputStream inputStream) throws ObjectStorageException - Throws:
ObjectStorageException
-
putObjects
void putObjects(String bucket, Map<ObjectReference, 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
-
removeObjects
-