2013-10-08 11:46:02 +02:00
|
|
|
/**
|
2014-02-02 19:05:45 -06:00
|
|
|
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
|
2013-10-08 11:46:02 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package akka.persistence.journal.japi
|
|
|
|
|
|
2013-10-27 08:01:14 +01:00
|
|
|
import scala.collection.immutable
|
|
|
|
|
import scala.collection.JavaConverters._
|
|
|
|
|
|
2014-01-17 06:58:25 +01:00
|
|
|
import akka.persistence._
|
2013-10-08 11:46:02 +02:00
|
|
|
import akka.persistence.journal.{ SyncWriteJournal ⇒ SSyncWriteJournal }
|
|
|
|
|
|
|
|
|
|
/**
|
2013-11-07 10:45:02 +01:00
|
|
|
* Java API: abstract journal, optimized for synchronous writes.
|
2013-10-08 11:46:02 +02:00
|
|
|
*/
|
2014-01-17 06:58:25 +01:00
|
|
|
abstract class SyncWriteJournal extends AsyncRecovery with SSyncWriteJournal with SyncWritePlugin {
|
|
|
|
|
final def writeMessages(messages: immutable.Seq[PersistentRepr]) =
|
|
|
|
|
doWriteMessages(messages.asJava)
|
2013-10-27 08:01:14 +01:00
|
|
|
|
2014-01-17 06:58:25 +01:00
|
|
|
final def writeConfirmations(confirmations: immutable.Seq[PersistentConfirmation]) =
|
|
|
|
|
doWriteConfirmations(confirmations.asJava)
|
2013-10-08 11:46:02 +02:00
|
|
|
|
2014-01-17 06:58:25 +01:00
|
|
|
final def deleteMessages(messageIds: immutable.Seq[PersistentId], permanent: Boolean) =
|
|
|
|
|
doDeleteMessages(messageIds.asJava, permanent)
|
|
|
|
|
|
|
|
|
|
final def deleteMessagesTo(processorId: String, toSequenceNr: Long, permanent: Boolean) =
|
|
|
|
|
doDeleteMessagesTo(processorId, toSequenceNr, permanent)
|
2013-10-08 11:46:02 +02:00
|
|
|
}
|