public class JdbcObjectStore<T extends Serializable> extends AbstractMonitoredObjectStore<T> implements MuleContextAware
context, entryTTL, expirationInterval, logger, maxEntries, name, scheduler
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
JdbcObjectStore() |
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.
|
protected void |
expire() |
String |
getClearQuery() |
String |
getClearQueryKey() |
String |
getDeleteQuery() |
String |
getDeleteQueryKey() |
String |
getInsertQuery() |
String |
getInsertQueryKey() |
JdbcConnector |
getJdbcConnector() |
String |
getSelectQuery() |
String |
getSelectQueryKey() |
TransactionConfig |
getTransactionConfig() |
boolean |
isPersistent()
Is this store persistent?
|
T |
remove(Serializable key)
Remove the object with key.
|
T |
retrieve(Serializable key)
Retrieve the given Object.
|
void |
setClearQueryKey(String clearQueryKey) |
void |
setDeleteQueryKey(String deleteQueryKey) |
void |
setInsertQueryKey(String insertQueryKey) |
void |
setJdbcConnector(JdbcConnector jdbcConnector) |
void |
setSelectQueryKey(String selectQueryKey) |
void |
setTransactionConfig(TransactionConfig transactionConfig) |
void |
store(Serializable key,
T value)
Store the given Object.
|
void |
store(Serializable key,
T value,
String[] parameters) |
dispose, getEntryTTL, getExpirationInterval, getMaxEntries, getMuleContext, getName, getScheduler, initialise, run, setEntryTTL, setExpirationInterval, setMaxEntries, setMuleContext, setName, setScheduler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setMuleContext
public boolean isPersistent()
isPersistent
in interface ObjectStore<T extends Serializable>
protected void expire()
expire
in class AbstractMonitoredObjectStore<T extends Serializable>
public boolean contains(Serializable key) throws ObjectStoreException
contains
in interface ObjectStore<T extends Serializable>
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
.ObjectStoreNotAvaliableException
- if any implementation-specific error
occured, e.g. when the store is not availablepublic T remove(Serializable key) throws ObjectStoreException
remove
in interface ObjectStore<T extends Serializable>
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.public void clear() throws ObjectStoreException
ObjectStore
clear
in interface ObjectStore<T extends Serializable>
ObjectStoreException
- if the operation failspublic T retrieve(Serializable key) throws ObjectStoreException
retrieve
in interface ObjectStore<T extends Serializable>
key
- the identifier of the object to retrieve.ObjectDoesNotExistException
.ObjectStoreException
- if the given key is null
.ObjectStoreNotAvaliableException
- if the store is not available or any
other implementation-specific error occured.ObjectDoesNotExistException
- if no value for the given key was
previously stored.public void store(Serializable key, T value, String[] parameters) throws ObjectStoreException
ObjectStoreException
public void store(Serializable key, T value) throws ObjectStoreException
store
in interface ObjectStore<T extends Serializable>
key
- the identifier for value
value
- the Object to store with key
ObjectStoreException
- if the given key cannot be stored or is
null
.ObjectStoreNotAvaliableException
- 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.public JdbcConnector getJdbcConnector()
public void setJdbcConnector(JdbcConnector jdbcConnector)
public TransactionConfig getTransactionConfig()
public void setTransactionConfig(TransactionConfig transactionConfig)
public String getInsertQuery()
public String getSelectQuery()
public String getDeleteQuery()
public String getClearQuery()
public String getInsertQueryKey()
public void setInsertQueryKey(String insertQueryKey)
public String getSelectQueryKey()
public void setSelectQueryKey(String selectQueryKey)
public String getDeleteQueryKey()
public void setDeleteQueryKey(String deleteQueryKey)
public String getClearQueryKey()
public void setClearQueryKey(String clearQueryKey)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.