T - the generic type of the objects to be storedpublic interface ObjectStore<T extends Serializable>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all items of this store without disposing it, meaning that after performing a clear(), you should still be able
perform other operations.
|
boolean |
contains(Serializable key)
Check whether the given Object is already registered with this store.
|
boolean |
isPersistent()
Is this store persistent?
|
T |
remove(Serializable key)
Remove the object with key.
|
T |
retrieve(Serializable key)
Retrieve the given Object.
|
void |
store(Serializable key,
T value)
Store the given Object.
|
boolean contains(Serializable key) throws ObjectStoreException
key - the identifier of the object to checktrue if the key is stored or false no value was stored for the key.ObjectStoreException - if the given key is null.ObjectStoreNotAvailableException - if any implementation-specific error occured, e.g. when the store is not availablevoid store(Serializable key, T value) throws ObjectStoreException
key - the identifier for valuevalue - the Object to store with keyObjectStoreException - if the given key cannot be stored or is null.ObjectStoreNotAvailableException - if the store is not available or any other implementation-specific error occured.ObjectAlreadyExistsException - if an attempt is made to store an object for a key that already has an object
associated.T retrieve(Serializable key) throws ObjectStoreException
key - the identifier of the object to retrieve.ObjectDoesNotExistException.ObjectStoreException - if the given key is null.ObjectStoreNotAvailableException - if the store is not available or any other implementation-specific error occured.ObjectDoesNotExistException - if no value for the given key was previously stored.T remove(Serializable key) throws ObjectStoreException
key - the identifier of the object to remove.ObjectStoreException - if the given key is null or if the store is not available or any other
implementation-specific error occuredObjectDoesNotExistException - if no value for the given key was previously stored.boolean isPersistent()
void clear()
throws ObjectStoreException
ObjectStoreException - if the operation failsCopyright © 2017 MuleSoft, Inc.. All rights reserved.