!per #3652 Custom snapshot and persistent message serialization

- Protobuf serializer for Persistent message
- Configurable serializer for Persistent message's payload
- Configurable serializer for snapshots
This commit is contained in:
Martin Krasser 2013-10-09 13:11:53 +02:00
parent 6f89d346ec
commit 2a30399a29
35 changed files with 4049 additions and 390 deletions

View file

@ -12,7 +12,7 @@ import akka.persistence.PersistentImpl
*
* Abstract journal, optimized for synchronous writes.
*/
abstract class SyncWriteJournal extends AsyncReplay with SSyncWriteJournal {
abstract class SyncWriteJournal extends AsyncReplay with SSyncWriteJournal with SyncWritePlugin {
final def write(persistent: PersistentImpl) =
doWrite(persistent)
@ -21,28 +21,4 @@ abstract class SyncWriteJournal extends AsyncReplay with SSyncWriteJournal {
final def confirm(processorId: String, sequenceNr: Long, channelId: String) =
doConfirm(processorId, sequenceNr, channelId)
/**
* Plugin Java API.
*
* Synchronously writes a `persistent` message to the journal.
*/
@throws(classOf[Exception])
def doWrite(persistent: PersistentImpl): Unit
/**
* Plugin Java API.
*
* Synchronously marks a `persistent` message as deleted.
*/
@throws(classOf[Exception])
def doDelete(persistent: PersistentImpl): Unit
/**
* Plugin Java API.
*
* Synchronously writes a delivery confirmation to the journal.
*/
@throws(classOf[Exception])
def doConfirm(processorId: String, sequenceNr: Long, channelId: String): Unit
}