@Repository @Transactional(value="sessionTransactionManager") public class DBTransactionStorage extends Object implements ITransactionStorage
Constructor and Description |
---|
DBTransactionStorage() |
Modifier and Type | Method and Description |
---|---|
void |
changeKey(String oldKey,
String newKey,
Object value)
Change the key of a data object and store it under the new key
|
List<String> |
clean(Date now,
long dataTimeOut)
Get all entries for Clean-up the transaction storage
|
boolean |
containsKey(String key)
Check if transaction storage contains a data object with a specific key
|
Object |
get(String key)
Get a data object from transaction storage
|
<T> T |
get(String key,
Class<T> clazz)
Get a data object from transaction storage
|
<T> T |
get(String key,
Class<T> clazz,
long dataTimeOut)
Get a data object from transaction storage
|
Object |
getAssertionStore(String key)
Get whole AssertionStoreObject, required for SLO
|
void |
put(String key,
Object value,
int timeout_ms)
Store a data object with a key to transaction storage
|
void |
putAssertionStore(Object element)
Put whole AssertionStoreObject to db, required for SLO
|
void |
remove(String key)
Remove a data object from transaction storage
|
public boolean containsKey(String key)
ITransactionStorage
containsKey
in interface ITransactionStorage
key
- Key, which identifies a data objectpublic void changeKey(String oldKey, String newKey, Object value) throws at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
ITransactionStorage
changeKey
in interface ITransactionStorage
oldKey
- Old key of the data objectnewKey
- New key, which should be used to store the data objectvalue
- Data object which should be storedat.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
- In case of store operation failedpublic void put(String key, Object value, int timeout_ms) throws at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
ITransactionStorage
put
in interface ITransactionStorage
key
- Id which identifiers the data objectvalue
- Data object which should be stored.
This data must implement the java.io.Serializable
interfacetimeout_ms
- Defines the period of time a data object is kept within the storageat.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
- In case of store operation failedpublic <T> T get(String key, Class<T> clazz) throws at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
ITransactionStorage
get
in interface ITransactionStorage
key
- Id which identifiers the data objectclazz
- The class type which is stored with this keyat.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
- In case of load operation failedpublic Object getAssertionStore(String key) throws at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
ITransactionStorage
getAssertionStore
in interface ITransactionStorage
key
- key Id which identifiers the data objectat.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
- In case of load operation failedpublic Object get(String key) throws at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
ITransactionStorage
get
in interface ITransactionStorage
key
- key Id which identifiers the data objectat.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
- In case of load operation failedpublic <T> T get(String key, Class<T> clazz, long dataTimeOut) throws at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException, AuthenticationException
ITransactionStorage
get
in interface ITransactionStorage
key
- Id which identifiers the data objectclazz
- The class type which is stored with this keyat.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
- In case of load operation failedAuthenticationException
- In case of data-object timeout occurspublic List<String> clean(Date now, long dataTimeOut)
ITransactionStorage
clean
in interface ITransactionStorage
now
- Current timedataTimeOut
- Data-object timeout in [ms]public void remove(String key)
ITransactionStorage
remove
in interface ITransactionStorage
key
- Id which identifiers the data objectpublic void putAssertionStore(Object element) throws at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
ITransactionStorage
putAssertionStore
in interface ITransactionStorage
element
- assertion store objectat.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException
Copyright © 2017. All rights reserved.