public class S3Backend extends org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
| Constructor and Description |
|---|
S3Backend() |
| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
Iterator<DataIdentifier> |
getAllIdentifiers() |
List<DataRecord> |
getAllMetadataRecords(String prefix) |
Iterator<DataRecord> |
getAllRecords() |
String |
getBucket() |
DataRecord |
getMetadataRecord(String name) |
byte[] |
getOrCreateReferenceKey() |
DataRecord |
getRecord(DataIdentifier identifier) |
void |
init() |
InputStream |
read(DataIdentifier identifier) |
void |
setBucket(String bucket) |
void |
setProperties(Properties properties)
Properties used to configure the backend.
|
void |
write(DataIdentifier identifier,
File file)
It uploads file to Amazon S3.
|
getReferenceFromIdentifierpublic void init()
throws DataStoreException
DataStoreExceptionpublic void write(DataIdentifier identifier, File file) throws DataStoreException
DataStoreExceptionpublic boolean exists(DataIdentifier identifier) throws DataStoreException
DataStoreExceptionpublic InputStream read(DataIdentifier identifier) throws DataStoreException
DataStoreExceptionpublic Iterator<DataIdentifier> getAllIdentifiers() throws DataStoreException
DataStoreExceptionpublic void deleteRecord(DataIdentifier identifier) throws DataStoreException
DataStoreExceptionpublic void close()
public String getBucket()
public void setBucket(String bucket)
public void setProperties(Properties properties)
properties - to configure S3Backendpublic void addMetadataRecord(InputStream input, String name) throws DataStoreException
DataStoreExceptionpublic void addMetadataRecord(File input, String name) throws DataStoreException
DataStoreExceptionpublic DataRecord getMetadataRecord(String name)
public List<DataRecord> getAllMetadataRecords(String prefix)
public boolean deleteMetadataRecord(String name)
public void deleteAllMetadataRecords(String prefix)
public Iterator<DataRecord> getAllRecords()
public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException
DataStoreExceptionpublic byte[] getOrCreateReferenceKey()
throws DataStoreException
getOrCreateReferenceKey in class org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackendDataStoreExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.