3:d iteration of modularization (all but fun tests done)

This commit is contained in:
jboner 2009-09-03 11:02:21 +02:00
parent 91ad702e52
commit 6015b09bec
33 changed files with 388 additions and 164 deletions

View file

@ -1,14 +1,12 @@
package se.scalablesolutions.akka.kernel.actor
package se.scalablesolutions.akka.state
import akka.actor.Actor
import junit.framework.TestCase
import org.junit.{Test, Before}
import org.junit.Assert._
import dispatch.json._
import dispatch.json.Js._
import kernel.state.{MongoStorageConfig, TransactionalState}
/**
* A persistent actor based on MongoDB storage.
* <p/>
@ -31,9 +29,9 @@ case object LogSize
class BankAccountActor extends Actor {
makeTransactionRequired
private val accountState =
TransactionalState.newPersistentMap(MongoStorageConfig())
PersistentState.newMap(MongoStorageConfig())
private val txnLog =
TransactionalState.newPersistentVector(MongoStorageConfig())
PersistentState.newVector(MongoStorageConfig())
def receive: PartialFunction[Any, Unit] = {
// check balance