2013-10-09 13:11:53 +02:00
|
|
|
/**
|
2014-02-02 19:05:45 -06:00
|
|
|
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
|
2013-10-09 13:11:53 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package akka.persistence.journal.japi;
|
|
|
|
|
|
2014-01-17 06:58:25 +01:00
|
|
|
import akka.persistence.*;
|
2013-10-09 13:11:53 +02:00
|
|
|
|
|
|
|
|
interface SyncWritePlugin {
|
|
|
|
|
//#sync-write-plugin-api
|
2013-10-27 08:01:14 +01:00
|
|
|
/**
|
2013-11-07 10:45:02 +01:00
|
|
|
* Java API, Plugin API: synchronously writes a batch of persistent messages to the
|
|
|
|
|
* journal. The batch write must be atomic i.e. either all persistent messages in the
|
|
|
|
|
* batch are written or none.
|
2013-10-27 08:01:14 +01:00
|
|
|
*/
|
2014-01-17 06:58:25 +01:00
|
|
|
void doWriteMessages(Iterable<PersistentRepr> messages);
|
2013-10-27 08:01:14 +01:00
|
|
|
|
2013-10-09 13:11:53 +02:00
|
|
|
/**
|
2014-01-17 06:58:25 +01:00
|
|
|
* Java API, Plugin API: synchronously writes a batch of delivery confirmations to
|
|
|
|
|
* the journal.
|
2014-06-27 08:46:07 +02:00
|
|
|
*
|
|
|
|
|
* @deprecated doWriteConfirmations will be removed, since Channels will be removed (since 2.3.4)
|
2013-10-09 13:11:53 +02:00
|
|
|
*/
|
2014-06-27 08:46:07 +02:00
|
|
|
@Deprecated void doWriteConfirmations(Iterable<PersistentConfirmation> confirmations);
|
2013-10-09 13:11:53 +02:00
|
|
|
|
|
|
|
|
/**
|
2014-01-17 06:58:25 +01:00
|
|
|
* Java API, Plugin API: synchronously deletes messages identified by `messageIds`
|
|
|
|
|
* from the journal. If `permanent` is set to `false`, the persistent messages are
|
|
|
|
|
* marked as deleted, otherwise they are permanently deleted.
|
2014-06-27 08:46:07 +02:00
|
|
|
*
|
|
|
|
|
* @deprecated doDeleteMessages will be removed (since 2.3.4)
|
2014-01-17 06:58:25 +01:00
|
|
|
*/
|
2014-06-27 11:51:58 +02:00
|
|
|
@Deprecated void doDeleteMessages(Iterable<PersistentId> messageIds, boolean permanent);
|
2014-01-17 06:58:25 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Java API, Plugin API: synchronously deletes all persistent messages up to
|
|
|
|
|
* `toSequenceNr`. If `permanent` is set to `false`, the persistent messages are
|
|
|
|
|
* marked as deleted, otherwise they are permanently deleted.
|
|
|
|
|
*
|
|
|
|
|
* @see AsyncRecoveryPlugin
|
2013-10-09 13:11:53 +02:00
|
|
|
*/
|
2014-06-23 14:33:35 +02:00
|
|
|
void doDeleteMessagesTo(String persistenceId, long toSequenceNr, boolean permanent);
|
2013-10-09 13:11:53 +02:00
|
|
|
//#sync-write-plugin-api
|
|
|
|
|
}
|