public interface DatabaseTransition
Modifier and Type | Method and Description |
---|---|
void |
backup(PersistentDomain domain)
Backup a persistent domain
|
void |
closePersistenceDomain(java.lang.String domain)
Stop persistence service for a domain
|
void |
deleteRecord(TransactionContext context,
PersistentType<?> peristentType,
java.lang.String taskID,
Instruction instruction)
Execute an instruction delete
|
boolean |
exists(TransactionContext context,
PersistentType<?> persistentType,
java.lang.Object key)
Indicate, if an object exists within persistence
|
org.resoa.json.JSONObject |
finalizeRelations(TransactionContext context,
PersistentType<?> persistentType,
org.resoa.json.JSONObject json)
Finalize persistent relations
|
java.lang.Object |
getDatabase() |
<T> T |
getInstance(TransactionContext context,
PersistentType<T> persistentType,
java.lang.Object key)
Return an object instance
|
java.lang.String |
getJSONFromDB(TransactionContext context,
PersistentType<?> persistentType,
java.lang.Object key)
return the unresolved JSON representation of an object, before the transaction starts
|
void |
init(PersistentDomain persistDomain)
Initialize the database
|
void |
newPersistenceType(PersistentType<?> persistentType)
Activate persistence for a new type
|
org.resoa.grid.RecordSet |
readRecords(TransactionContext context,
PersistentType<?> peristentType,
org.resoa.grid.RecordSet result,
boolean keysOnly)
Read a set of records from database
|
TransactionContext |
startTransaction(java.lang.String domain,
TransactionContext.TransactionType type)
Start a transaction for a persistent service domain
|
void |
stop()
Stop all services
|
void |
storeRecord(TransactionContext context,
PersistentType<?> peristentType,
java.lang.String taskID,
Instruction instruction)
Store a single instruction
|
TransactionContext startTransaction(java.lang.String domain, TransactionContext.TransactionType type) throws org.resoa.exception.PersistenceException
domain
- type
- org.resoa.exception.PersistenceException
void init(PersistentDomain persistDomain) throws org.resoa.exception.PersistenceException
persistDomain
- org.resoa.exception.PersistenceException
void newPersistenceType(PersistentType<?> persistentType) throws org.resoa.exception.PersistenceException
persistentType
- org.resoa.exception.PersistenceException
void closePersistenceDomain(java.lang.String domain)
domain
- void stop()
java.lang.String getJSONFromDB(TransactionContext context, PersistentType<?> persistentType, java.lang.Object key)
persistentType
- key
- context
- <T> T getInstance(TransactionContext context, PersistentType<T> persistentType, java.lang.Object key)
persistentType
- key
- boolean exists(TransactionContext context, PersistentType<?> persistentType, java.lang.Object key)
persistentType
- key
- context
- void storeRecord(TransactionContext context, PersistentType<?> peristentType, java.lang.String taskID, Instruction instruction) throws org.resoa.exception.PersistenceException
context
- peristentType
- taskID
- instruction
- org.resoa.exception.PersistenceException
void deleteRecord(TransactionContext context, PersistentType<?> peristentType, java.lang.String taskID, Instruction instruction) throws org.resoa.exception.PersistenceException
context
- peristentType
- taskID
- instruction
- org.resoa.exception.PersistenceException
org.resoa.grid.RecordSet readRecords(TransactionContext context, PersistentType<?> peristentType, org.resoa.grid.RecordSet result, boolean keysOnly)
peristentType
- result
- keysOnly
- context
- org.resoa.json.JSONObject finalizeRelations(TransactionContext context, PersistentType<?> persistentType, org.resoa.json.JSONObject json)
persistentType
- json
- context
- void backup(PersistentDomain domain) throws org.resoa.exception.PersistenceException
domain
- org.resoa.exception.PersistenceException
java.lang.Object getDatabase()
Copyright © 2005-2014 The Resoa Project, resoa.org.