added init tx state hook for active objects, rewrote mongodb test
This commit is contained in:
parent
1bce709c5d
commit
98bdd9370d
17 changed files with 538 additions and 593 deletions
|
|
@ -29,12 +29,8 @@ case object LogSize
|
|||
class BankAccountActor extends Actor {
|
||||
makeTransactionRequired
|
||||
|
||||
private var accountState: PersistentMap = _
|
||||
private var txnLog: PersistentVector = _
|
||||
override def initializeTransactionalState = {
|
||||
accountState = PersistentState.newMap(MongoStorageConfig())
|
||||
txnLog = PersistentState.newVector(MongoStorageConfig())
|
||||
}
|
||||
private lazy val accountState: PersistentMap = PersistentState.newMap(MongoStorageConfig())
|
||||
private lazy val txnLog: PersistentVector = PersistentState.newVector(MongoStorageConfig())
|
||||
|
||||
def receive: PartialFunction[Any, Unit] = {
|
||||
// check balance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue