Class S3Backend
java.lang.Object
org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
org.apache.jackrabbit.oak.blob.cloud.s3.S3Backend
- All Implemented Interfaces:
org.apache.jackrabbit.oak.spi.blob.SharedBackend
public class S3Backend
extends org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
A data store backend that stores data on Amazon S3.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetadataRecord
(File input, String name) void
addMetadataRecord
(InputStream input, String name) void
close()
void
deleteAllMetadataRecords
(String prefix) boolean
deleteMetadataRecord
(String name) void
deleteRecord
(DataIdentifier identifier) boolean
exists
(DataIdentifier identifier) Check if record identified by identifier exists in Amazon S3.getAllMetadataRecords
(String prefix) getMetadataRecord
(String name) byte[]
getRecord
(DataIdentifier identifier) void
init()
boolean
metadataRecordExists
(String name) read
(DataIdentifier identifier) void
void
setProperties
(Properties properties) Properties used to configure the backend.void
write
(DataIdentifier identifier, File file) It uploads file to Amazon S3.Methods inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
getReferenceFromIdentifier
-
Constructor Details
-
S3Backend
public S3Backend()
-
-
Method Details
-
init
- Throws:
DataStoreException
-
write
It uploads file to Amazon S3. If file size is greater than 5MB, this method uses parallel concurrent connections to upload.- Throws:
DataStoreException
-
exists
Check if record identified by identifier exists in Amazon S3.- Throws:
DataStoreException
-
read
- Throws:
DataStoreException
-
getAllIdentifiers
- Throws:
DataStoreException
-
deleteRecord
- Throws:
DataStoreException
-
close
public void close() -
getBucket
-
setBucket
-
setProperties
Properties used to configure the backend. If provided explicitly before init is invoked then these take precedence- Parameters:
properties
- to configure S3Backend
-
addMetadataRecord
- Throws:
DataStoreException
-
addMetadataRecord
- Throws:
DataStoreException
-
getMetadataRecord
-
getAllMetadataRecords
-
deleteMetadataRecord
-
deleteAllMetadataRecords
-
getAllRecords
-
getRecord
- Throws:
DataStoreException
-
getOrCreateReferenceKey
- Overrides:
getOrCreateReferenceKey
in classorg.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
- Throws:
DataStoreException
-
metadataRecordExists
-