Class S3Directory
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.aws.S3Directory
-
public final class S3Directory extends Object
-
-
Constructor Summary
Constructors Constructor Description S3Directory(com.amazonaws.services.s3.AmazonS3 s3, String bucketName, String rootDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyObject(S3Directory from, String fromKey)booleandeleteAllObjects()booleandeleteObjects(List<com.amazonaws.services.s3.model.DeleteObjectsRequest.KeyVersion> keys)booleandoesObjectExist(String name)voidensureBucket()StringgetConfig()com.amazonaws.services.s3.model.S3ObjectgetObject(String name)com.amazonaws.services.s3.model.ObjectMetadatagetObjectMetadata(String key)StringgetPath()List<com.amazonaws.services.s3.model.S3ObjectSummary>listObjects(String prefix)List<String>listPrefixes()voidputObject(String name, InputStream input)byte[]readObject(String key)BufferreadObjectToBuffer(String name, boolean offHeap)voidreadObjectToBuffer(String name, Buffer buffer)S3DirectorywithDirectory(String childDirectory)voidwriteObject(String name, byte[] data)
-
-
-
Method Detail
-
withDirectory
public S3Directory withDirectory(String childDirectory)
-
ensureBucket
public void ensureBucket() throws IOException- Throws:
IOException
-
getConfig
public String getConfig()
-
getPath
public String getPath()
-
doesObjectExist
public boolean doesObjectExist(String name)
-
getObject
public com.amazonaws.services.s3.model.S3Object getObject(String name) throws IOException
- Throws:
IOException
-
getObjectMetadata
public com.amazonaws.services.s3.model.ObjectMetadata getObjectMetadata(String key)
-
readObjectToBuffer
public Buffer readObjectToBuffer(String name, boolean offHeap) throws IOException
- Throws:
IOException
-
readObjectToBuffer
public void readObjectToBuffer(String name, Buffer buffer) throws IOException
- Throws:
IOException
-
readObject
public byte[] readObject(String key) throws IOException
- Throws:
IOException
-
writeObject
public void writeObject(String name, byte[] data) throws IOException
- Throws:
IOException
-
putObject
public void putObject(String name, InputStream input) throws IOException
- Throws:
IOException
-
copyObject
public void copyObject(S3Directory from, String fromKey) throws IOException
- Throws:
IOException
-
deleteObjects
public boolean deleteObjects(List<com.amazonaws.services.s3.model.DeleteObjectsRequest.KeyVersion> keys)
-
deleteAllObjects
public boolean deleteAllObjects()
-
listPrefixes
public List<String> listPrefixes() throws IOException
- Throws:
IOException
-
listObjects
public List<com.amazonaws.services.s3.model.S3ObjectSummary> listObjects(String prefix) throws IOException
- Throws:
IOException
-
-