2013-10-08 11:46:02 +02:00
|
|
|
/**
|
|
|
|
|
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package akka.persistence.journal.japi
|
|
|
|
|
|
2013-10-27 08:01:14 +01:00
|
|
|
import scala.collection.immutable
|
|
|
|
|
import scala.collection.JavaConverters._
|
|
|
|
|
|
2013-10-08 11:46:02 +02:00
|
|
|
import akka.persistence.journal.{ SyncWriteJournal ⇒ SSyncWriteJournal }
|
2013-11-07 10:45:02 +01:00
|
|
|
import akka.persistence.PersistentRepr
|
2013-10-08 11:46:02 +02:00
|
|
|
|
|
|
|
|
/**
|
2013-11-07 10:45:02 +01:00
|
|
|
* Java API: abstract journal, optimized for synchronous writes.
|
2013-10-08 11:46:02 +02:00
|
|
|
*/
|
2013-10-09 13:11:53 +02:00
|
|
|
abstract class SyncWriteJournal extends AsyncReplay with SSyncWriteJournal with SyncWritePlugin {
|
2013-11-20 13:47:42 +01:00
|
|
|
final def write(persistentBatch: immutable.Seq[PersistentRepr]) =
|
|
|
|
|
doWrite(persistentBatch.asJava)
|
2013-10-27 08:01:14 +01:00
|
|
|
|
2013-11-12 09:02:02 +01:00
|
|
|
final def delete(processorId: String, fromSequenceNr: Long, toSequenceNr: Long, permanent: Boolean) =
|
|
|
|
|
doDelete(processorId, fromSequenceNr, toSequenceNr, permanent)
|
2013-10-08 11:46:02 +02:00
|
|
|
|
|
|
|
|
final def confirm(processorId: String, sequenceNr: Long, channelId: String) =
|
|
|
|
|
doConfirm(processorId, sequenceNr, channelId)
|
|
|
|
|
}
|