public class SimpleObjectStore extends CloudResource
| Constructor and Description |
|---|
SimpleObjectStore(ApplicationEnvironment env,
SimpleStoreName store_name,
boolean is_read_only) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(S3Path path)
Delete an object from the simple object store
|
org.jimmutable.core.objects.StandardObject |
get(S3Path path,
org.jimmutable.core.objects.StandardObject default_value)
Get an object from the datastore
|
com.amazonaws.services.s3.AmazonS3 |
getSimpleAmazonS3() |
S3BucketName |
getSimpleS3BucketName() |
String |
getSimpleS3BucketNameString() |
SimpleStoreName |
getSimpleStoreName() |
boolean |
isReadOnly() |
boolean |
objectExists(S3Path path,
boolean default_value)
Check to see if a given object exists in the datastore
|
org.jimmutable.core.threading.OperationRunnable.Result |
scan(S3Path path,
ScanListener listener,
int processing_threads)
Scan all objects in a given path
This function blocks until all objects are scanned
|
void |
startScanAsycn(S3Path path,
ScanListener listener,
int processing_threads)
Scan all objects in a given path
This function blocks until all objects are scanned
|
boolean |
upsert(SimpleObjectStorable obj)
Upload an object into the datastore
NOTE: Objects are assumed to be relatively small (less than 10MB
Serialized).
|
getSimpleCloudNamepublic SimpleObjectStore(ApplicationEnvironment env, SimpleStoreName store_name, boolean is_read_only)
public SimpleStoreName getSimpleStoreName()
public boolean isReadOnly()
public com.amazonaws.services.s3.AmazonS3 getSimpleAmazonS3()
public S3BucketName getSimpleS3BucketName()
public String getSimpleS3BucketNameString()
public boolean upsert(SimpleObjectStorable obj)
obj - The object to upsertpublic org.jimmutable.core.objects.StandardObject get(S3Path path, org.jimmutable.core.objects.StandardObject default_value)
path - The path to read fromdefault_value - The value to return if the object can not be read (for any reason)public boolean objectExists(S3Path path, boolean default_value)
path - The path of the objectdefault_value - The value to return if any sort of error occourspublic boolean delete(S3Path path)
path - The path of the object to deletepublic org.jimmutable.core.threading.OperationRunnable.Result scan(S3Path path, ScanListener listener, int processing_threads)
path - The root path of the scan (to scan the whole bucket use
S3Path.PATH_BUCKET_ROOT, null is not allowed)listener - The scan listenerprocessing_threads - The number of object processign threads to usepublic void startScanAsycn(S3Path path, ScanListener listener, int processing_threads)
path - The root path of the scan (to scan the whole bucket use
S3Path.PATH_BUCKET_ROOT, null is not allowed)listener - The scan listenerprocessing_threads - The number of object processign threads to useCopyright © 2017. All rights reserved.