mid cassandra rewrite
This commit is contained in:
parent
136cb4e334
commit
32ef59c67c
7 changed files with 296 additions and 105 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package sample.scala
|
||||
|
||||
import javax.ws.rs.{Path, GET, Produces}
|
||||
import se.scalablesolutions.akka.kernel.state.{TransactionalState, TransactionalMap, CassandraStorageConfig}
|
||||
import se.scalablesolutions.akka.kernel.state.{TransactionalState, TransactionalMap, EmbeddedCassandraStorageConfig}
|
||||
import se.scalablesolutions.akka.kernel.actor.{Supervisor, SupervisorFactory, Actor, StartSupervisor}
|
||||
import se.scalablesolutions.akka.kernel.config.ScalaConfig._
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ class SimpleService extends Actor {
|
|||
case object Tick
|
||||
private val KEY = "COUNTER";
|
||||
private var hasStartedTicking = false;
|
||||
private val storage = TransactionalState.newPersistentMap(CassandraStorageConfig())
|
||||
private val storage = TransactionalState.newPersistentMap(EmbeddedCassandraStorageConfig())
|
||||
|
||||
@GET
|
||||
@Produces(Array("application/json"))
|
||||
|
|
@ -58,4 +58,4 @@ class SimpleService extends Actor {
|
|||
override protected def postRestart(reason: AnyRef, config: Option[AnyRef]) = {
|
||||
println("Restarting due to: " + reason.asInstanceOf[Exception].getMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue