Interface ServerTransactionManager
- 
- All Superinterfaces:
- java.lang.AutoCloseable,- TransactionManager
 - All Known Implementing Classes:
- TransactionResourceManager
 
 public interface ServerTransactionManager extends java.lang.AutoCloseable, TransactionManager 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceServerTransactionManager.InitialSequenceIdPolicystatic interfaceServerTransactionManager.ServerTransactionConfig- 
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.transaction.TransactionManagerTransactionManager.TransactionConfig
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()voidensureTransactionOpen(java.lang.String transactionId, State state)Ensure that the given transaction ID is initialized.ServerTransactionManager.ServerTransactionConfiggetCfg()Retrieve a configuration read from theRepository.StategetCurrentState(java.lang.String transactionId)Retrieve current state of the transaction.voidhouseKeeping()Called by the server to signal that the manager should reclaim any resources that are not needed anymore.voidrunObservations(java.lang.String name, BiConsumer<StreamElement,Pair<java.lang.Long,java.lang.Object>> updateConsumer, CommitLogObserver requestObserver)Observe all transactional families with given observer.voidwriteResponseAndUpdateState(java.lang.String transactionId, State state, java.lang.String responseId, Response response, CommitCallback callback)Atomically write response and update state of a transaction- 
Methods inherited from interface cz.o2.proxima.direct.core.transaction.TransactionManagergetCommitDesc, getRequestDesc, getResponseDesc, getStateDesc, getTransaction
 
- 
 
- 
- 
- 
Method Detail- 
runObservationsvoid runObservations(java.lang.String name, BiConsumer<StreamElement,Pair<java.lang.Long,java.lang.Object>> updateConsumer, CommitLogObserver requestObserver)Observe all transactional families with given observer.- Parameters:
- name- name of the observer (will be appended with name of the family)
- updateConsumer- consumer of updates to the view of transaction states
- requestObserver- the observer (need not be synchronized)
 
 - 
getCurrentStateState getCurrentState(java.lang.String transactionId) Retrieve current state of the transaction.- Parameters:
- transactionId- ID of the transaction
- Returns:
- the Stateassociated with the transaction on server
 
 - 
ensureTransactionOpenvoid ensureTransactionOpen(java.lang.String transactionId, State state)Ensure that the given transaction ID is initialized.- Parameters:
- transactionId- ID of the transaction
- state- the state that the transaction is supposed to have
 
 - 
writeResponseAndUpdateStatevoid writeResponseAndUpdateState(java.lang.String transactionId, State state, java.lang.String responseId, Response response, CommitCallback callback)Atomically write response and update state of a transaction- Parameters:
- transactionId- ID of transaction
- state- the state to update the transaction to
- responseId- ID of response
- response- the response
- callback- callback for commit after write
 
 - 
closevoid close() - Specified by:
- closein interface- java.lang.AutoCloseable
 
 - 
houseKeepingvoid houseKeeping() Called by the server to signal that the manager should reclaim any resources that are not needed anymore.
 - 
getCfgServerTransactionManager.ServerTransactionConfig getCfg() Retrieve a configuration read from theRepository.- Specified by:
- getCfgin interface- TransactionManager
 
 
- 
 
-