|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Store
Implementations provide a persistent store for runtime data such as conversational state. A persistent store could be implemented in a durable fashion using JDBC or a journaling system, or using a non-durable mechanism such as an in-memory map.
| Field Summary | |
|---|---|
static long |
DEFAULT_EXPIRATION_OFFSET
|
static long |
NEVER
|
| Method Summary | |
|---|---|
void |
insertRecord(RuntimeComponent owner,
java.lang.String id,
java.lang.Object object,
long expiration)
Adds the given record to the store. |
java.lang.Object |
readRecord(RuntimeComponent owner,
java.lang.String id)
Returns the deserialized object in the store corresponding to the given id |
void |
recover(RecoveryListener listener)
Initiates a recovery operation, for example during restart after a crash |
void |
removeRecord(RuntimeComponent owner,
java.lang.String id)
Removes a record from the store |
void |
removeRecords()
Removes all records from the store |
void |
updateRecord(RuntimeComponent owner,
java.lang.String id,
java.lang.Object object,
long expiration)
Updates a given record in the store, overwriting previous information. |
| Methods inherited from interface org.apache.tuscany.sca.event.EventPublisher |
|---|
addListener, addListener, publish, removeListener |
| Field Detail |
|---|
static final long DEFAULT_EXPIRATION_OFFSET
static final long NEVER
| Method Detail |
|---|
void insertRecord(RuntimeComponent owner,
java.lang.String id,
java.lang.Object object,
long expiration)
throws StoreWriteException
owner - the instance ownerid - the unique id of the recordobject - the object representing the data to writeexpiration - the time in milliseconds when the entry expires
StoreWriteException - if an error occurs during the write operation
void updateRecord(RuntimeComponent owner,
java.lang.String id,
java.lang.Object object,
long expiration)
throws StoreWriteException
owner - the instance ownerid - the unique id of the recordobject - the object representing the data to writeexpiration - the time in milliseconds when the entry expires
StoreWriteException
java.lang.Object readRecord(RuntimeComponent owner,
java.lang.String id)
throws StoreReadException
owner - the instance ownerid - the unique id of the record
StoreReadException
void removeRecord(RuntimeComponent owner,
java.lang.String id)
throws StoreWriteException
owner - the instance ownerid - the unique id of the record
StoreWriteException
void removeRecords()
throws StoreWriteException
StoreWriteException
void recover(RecoveryListener listener)
throws StoreReadException
listener - the listener to receive recovery callback events
StoreReadException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||