public class ObjectsOnS3 extends AbstractBaseS3Namespaceable implements StreamingObjects
| Constructor and Description |
|---|
ObjectsOnS3(com.amazonaws.services.s3.AmazonS3 s3Client,
String bucketName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(String namespace,
String key) |
byte[] |
get(String namespace,
String key) |
Collection<String> |
keys(String namespace,
int start,
int count) |
Collection<String> |
keys(String namespace,
String prefix,
int start,
int count) |
int |
size(String namespace) |
void |
store(String namespace,
String key,
byte[] bytes) |
void |
store(String namespace,
String key,
InputStream stream,
long length)
Stores the given object by streaming the content to the underlying storage
|
InputStream |
stream(String namespace,
String key)
Gets the object corresponding to the given namespace/key as an
InputStream |
create, droppublic ObjectsOnS3(com.amazonaws.services.s3.AmazonS3 s3Client,
String bucketName)
throws IOException
IOExceptionpublic void store(String namespace, String key, byte[] bytes) throws IOException
store in interface com.salesforce.cantor.ObjectsIOExceptionpublic byte[] get(String namespace, String key) throws IOException
get in interface com.salesforce.cantor.ObjectsIOExceptionpublic boolean delete(String namespace, String key) throws IOException
delete in interface com.salesforce.cantor.ObjectsIOExceptionpublic Collection<String> keys(String namespace, int start, int count) throws IOException
keys in interface com.salesforce.cantor.ObjectsIOExceptionpublic Collection<String> keys(String namespace, String prefix, int start, int count) throws IOException
keys in interface com.salesforce.cantor.ObjectsIOExceptionpublic int size(String namespace) throws IOException
size in interface com.salesforce.cantor.ObjectsIOExceptionpublic void store(String namespace, String key, InputStream stream, long length) throws IOException
StreamingObjectsstore in interface StreamingObjectsnamespace - the namespace to store inkey - the key for the objectstream - the content of the object as an InputStreamlength - the full length of the contentIOExceptionpublic InputStream stream(String namespace, String key) throws IOException
StreamingObjectsInputStreamstream in interface StreamingObjectsnamespace - the namespace of the objectkey - the key of the objectInputStream for the stored object/null if it doesn't existIOExceptionCopyright © 2023. All rights reserved.