Created
December 7, 2014 05:12
-
-
Save mhamrah/eb0b6823d972dbadb1a3 to your computer and use it in GitHub Desktop.
persistence-test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rocksdb-journal { | |
class = "com.hamrah.akka.persistence.rocksdb.RocksDbJournal" | |
plugin-dispatcher = "akka.actor.default-dispatcher" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hamrah.akka.persistence.rocksdb | |
package journal | |
import akka.persistence._ | |
import akka.persistence.journal._ | |
import com.typesafe.config._ | |
import scala.collection._ | |
import scala.concurrent.Future | |
import scala.concurrent.duration._ | |
class RocksDbJournal extends AsyncWriteJournal { | |
import context.dispatcher | |
def asyncWriteMessages(messages: immutable.Seq[PersistentRepr]): Future[Unit] = { | |
Future {} | |
} | |
def asyncDeleteMessagesTo(persistenceId: String, toSequenceNr: Long, permanent: Boolean): Future[Unit] = { | |
Future {} | |
} | |
def asyncReplayMessages(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long, max: Long)(replayCallback: PersistentRepr ⇒ Unit): Future[Unit] = { | |
Future {} | |
} | |
def asyncReadHighestSequenceNr(persistenceId: String, fromSequenceNr: Long): Future[Long] = { | |
Future { 1L } | |
} | |
def asyncDeleteMessages(messageIds: scala.collection.immutable.Seq[akka.persistence.PersistentId],permanent: Boolean): scala.concurrent.Future[Unit] = Future { } | |
def asyncWriteConfirmations(confirmations: scala.collection.immutable.Seq[akka.persistence.PersistentConfirmation]): scala.concurrent.Future[Unit] = Future { } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hamrah.akka.persistence.rocksdb | |
package journal | |
import akka.persistence.journal._ | |
import com.typesafe.config.ConfigFactory | |
import akka.actor._ | |
class RocksDbJournalSpec | |
extends JournalSpec { | |
override val config = ConfigFactory.parseString( | |
""" | |
akka.persistence.journal.plugin = "rocksdb-journal" | |
""".stripMargin) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment