|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.objectstore.util.ObjectStoreRetryUtil
public final class ObjectStoreRetryUtil
Utility class to retry objectstore operations.
| Method Summary | |
|---|---|
static void |
retryClose(StoreOutputStream storeOutputStream)
calls StoreOutputStream.close(), retries in case of IOException. |
static void |
retryCreateStore(ObjectStoreService objectStore,
java.lang.String storeName,
AnyMap storeProperties,
boolean storeExistsException)
Prepares a store and retries on ServiceUnavailableException. |
static void |
retryEnsureStore(ObjectStoreService objectStore,
java.lang.String storeName)
Ensures that a store exists. |
static boolean |
retryExistsObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId)
Checks if an object in a store exists. |
static boolean |
retryExistsStore(ObjectStoreService objectStore,
java.lang.String storeName)
Checks if a store exists. |
static java.util.Collection<StoreObject> |
retryGetStoreObjectInfos(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectIdPrefix)
Retries listing object infos from a store. |
static void |
retryPutObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId,
byte[] data)
Open a store and puts data to an object. |
static java.io.InputStream |
retryReadObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId)
Open a store and open an object for read. |
static StoreOutputStream |
retryWriteObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId)
Open a store and open an object for write. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.io.InputStream retryReadObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId)
throws ObjectStoreException
ServiceUnavailableException.
objectStore - ObjectStoreService reference to use.storeName - the name of the storeobjectId - name of object to read.
InputStream to read from the store.
ObjectStoreException - error reading object.
public static StoreOutputStream retryWriteObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId)
throws ObjectStoreException
ServiceUnavailableException.
objectStore - ObjectStoreService reference to use.storeName - the name of the storeobjectId - name of object to read.
StoreOutputStream to the object
ObjectStoreException - error opening object in the ObjectStoreService.
public static void retryPutObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId,
byte[] data)
throws ObjectStoreException
ServiceUnavailableException.
objectStore - ObjectStoreService reference to use.storeName - the name of the storeobjectId - name of object to read.data - the data to write to the object
ObjectStoreException - error opening object in the ObjectStoreService.
public static void retryCreateStore(ObjectStoreService objectStore,
java.lang.String storeName,
AnyMap storeProperties,
boolean storeExistsException)
throws ObjectStoreException
ServiceUnavailableException.
objectStore - ObjectStoreService reference to use.storeName - the name of the storestoreProperties - the properties of the storestoreExistsException - 'true': throw exception if store exists
ObjectStoreException - error preparing store (even after retrying if it is an ServiceUnavailableException).
public static void retryEnsureStore(ObjectStoreService objectStore,
java.lang.String storeName)
throws ObjectStoreException
objectStore - ObjectStoreService reference to use.storeName - the name of the store
ObjectStoreException - error preparing store (even after retrying if it is an ServiceUnavailableException).
public static boolean retryExistsStore(ObjectStoreService objectStore,
java.lang.String storeName)
throws ObjectStoreException
objectStore - ObjectStoreService reference to use.storeName - the name of the store
ObjectStoreException - error checking store existence (even after retrying if it is an ServiceUnavailableException).
public static java.util.Collection<StoreObject> retryGetStoreObjectInfos(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectIdPrefix)
throws ObjectStoreException
objectStore - ObjectStoreService reference to use.storeName - the name of the storeobjectIdPrefix - the prefix for the ids of the objects to list.
ObjectStoreException - error reading info (even after retrying if it is an ServiceUnavailableException).
public static boolean retryExistsObject(ObjectStoreService objectStore,
java.lang.String storeName,
java.lang.String objectId)
throws ObjectStoreException
objectStore - ObjectStoreService reference to use.storeName - the name of the storeobjectId - the id of the object
ObjectStoreException - error checking store existence (even after retrying if it is an ServiceUnavailableException).
public static void retryClose(StoreOutputStream storeOutputStream)
throws java.io.IOException
IOException.
java.io.IOException - could not successfully close StoreOutputStream even after retrying.
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||