public class SimpleMemoryObjectStore<T extends Serializable> extends TemplateObjectStore<T> implements ObjectStore<T>
| Constructor and Description |
|---|
SimpleMemoryObjectStore() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
allKeys() |
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.
|
void |
close()
Close the underlying store.
|
protected boolean |
doContains(String key)
Template method for
TemplateObjectStore.contains(String). |
protected T |
doRemove(String key)
Template method for
TemplateObjectStore.remove(String) (String, Serializable)}. |
protected T |
doRetrieve(String key)
Template method for
TemplateObjectStore.store(String, Serializable). |
protected void |
doStore(String key,
T value)
Template method for
TemplateObjectStore.store(String, Serializable). |
boolean |
isPersistent() |
void |
open()
Open the underlying store.
|
Map<String,T> |
retrieveAll() |
contains, remove, retrieve, storevalidateKey, validatePresentKeyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, remove, retrieve, storepublic boolean isPersistent()
isPersistent in interface ObjectStore<T extends Serializable>this store is persistent or notprotected boolean doContains(String key) throws ObjectStoreException
TemplateObjectStoreTemplateObjectStore.contains(String). Implement this method assuming that the key is already valid
doContains in class TemplateObjectStore<T extends Serializable>ObjectStoreExceptionprotected void doStore(String key, T value) throws ObjectStoreException
TemplateObjectStoreTemplateObjectStore.store(String, Serializable). Implement this method assuming that the key is valid and that
TemplateObjectStore.contains(String) has already been invoked to verify that the key doesn't already exists in this store. doStore in class TemplateObjectStore<T extends Serializable>ObjectStoreExceptionprotected T doRetrieve(String key) throws ObjectStoreException
TemplateObjectStoreTemplateObjectStore.store(String, Serializable). Implement this method assuming that the key is valid and that
TemplateObjectStore.contains(String) has already been invoked to verify that the key actually exists in this store. doRetrieve in class TemplateObjectStore<T extends Serializable>ObjectStoreExceptionpublic void clear()
throws ObjectStoreException
ObjectStoreclear in interface ObjectStore<T extends Serializable>ObjectStoreException - if the operation failsprotected T doRemove(String key)
TemplateObjectStoreTemplateObjectStore.remove(String) (String, Serializable)}. Implement this method assuming that the key is valid and
that TemplateObjectStore.contains(String) has already been invoked to verify that the key actually exists in this store. doRemove in class TemplateObjectStore<T extends Serializable>public Map<String,T> retrieveAll() throws ObjectStoreException
retrieveAll in interface ObjectStore<T extends Serializable>ObjectStoreException - if an exception occurred while collecting the valuespublic void open()
throws ObjectStoreException
ObjectStoreopen in interface ObjectStore<T extends Serializable>ObjectStoreException - if an exception occurred while opening the underlying store.public void close()
throws ObjectStoreException
ObjectStoreclose in interface ObjectStore<T extends Serializable>ObjectStoreException - if an exception occurred while closing the underlying store.public List<String> allKeys() throws ObjectStoreException
allKeys in interface ObjectStore<T extends Serializable>ObjectStoreException - if an exception occurred while collecting the list of all keys.Copyright © 2024 MuleSoft, Inc.. All rights reserved.