|
Akka/Scala example source code file (AsyncRecovery.scala)
The AsyncRecovery.scala Akka example source code/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.persistence.journal.japi import scala.concurrent.Future import akka.actor.Actor import akka.japi.Procedure import akka.persistence.journal.{ AsyncRecovery ⇒ SAsyncReplay } import akka.persistence.PersistentRepr /** * Java API: asynchronous message replay and sequence number recovery interface. */ abstract class AsyncRecovery extends SAsyncReplay with AsyncRecoveryPlugin { this: Actor ⇒ import context.dispatcher final def asyncReplayMessages(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long, max: Long)(replayCallback: (PersistentRepr) ⇒ Unit) = doAsyncReplayMessages(persistenceId, fromSequenceNr, toSequenceNr, max, new Procedure[PersistentRepr] { def apply(p: PersistentRepr) = replayCallback(p) }).map(Unit.unbox) final def asyncReadHighestSequenceNr(persistenceId: String, fromSequenceNr: Long): Future[Long] = doAsyncReadHighestSequenceNr(persistenceId, fromSequenceNr: Long).map(_.longValue) } Other Akka source code examplesHere is a short list of links related to this Akka AsyncRecovery.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.