Merge pull request #18148 from jgordijn/18032-remove_final_from_persit_in_PersistentActor-jgordijn
+per #18032 Removed final from all persist methods
This commit is contained in:
commit
40bbf52a28
2 changed files with 20 additions and 20 deletions
|
|
@ -288,7 +288,7 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
* @param event event to be persisted
|
||||
* @param handler handler for each persisted `event`
|
||||
*/
|
||||
final def persist[A](event: A)(handler: A ⇒ Unit): Unit = {
|
||||
def persist[A](event: A)(handler: A ⇒ Unit): Unit = {
|
||||
pendingStashingPersistInvocations += 1
|
||||
pendingInvocations addLast StashingHandlerInvocation(event, handler.asInstanceOf[Any ⇒ Unit])
|
||||
eventBatch = AtomicWrite(PersistentRepr(event, sender = sender())) :: eventBatch
|
||||
|
|
@ -302,7 +302,7 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
* @param events events to be persisted
|
||||
* @param handler handler for each persisted `events`
|
||||
*/
|
||||
final def persistAll[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit = {
|
||||
def persistAll[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit = {
|
||||
events.foreach { event ⇒
|
||||
pendingStashingPersistInvocations += 1
|
||||
pendingInvocations addLast StashingHandlerInvocation(event, handler.asInstanceOf[Any ⇒ Unit])
|
||||
|
|
@ -311,7 +311,7 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
}
|
||||
|
||||
@deprecated("use persistAll instead", "2.4")
|
||||
final def persist[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit =
|
||||
def persist[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit =
|
||||
persistAll(events)(handler)
|
||||
|
||||
/**
|
||||
|
|
@ -337,7 +337,7 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
* @param event event to be persisted
|
||||
* @param handler handler for each persisted `event`
|
||||
*/
|
||||
final def persistAsync[A](event: A)(handler: A ⇒ Unit): Unit = {
|
||||
def persistAsync[A](event: A)(handler: A ⇒ Unit): Unit = {
|
||||
pendingInvocations addLast AsyncHandlerInvocation(event, handler.asInstanceOf[Any ⇒ Unit])
|
||||
eventBatch = AtomicWrite(PersistentRepr(event, sender = sender())) :: eventBatch
|
||||
}
|
||||
|
|
@ -350,7 +350,7 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
* @param events events to be persisted
|
||||
* @param handler handler for each persisted `events`
|
||||
*/
|
||||
final def persistAllAsync[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit = {
|
||||
def persistAllAsync[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit = {
|
||||
events.foreach { event ⇒
|
||||
pendingInvocations addLast AsyncHandlerInvocation(event, handler.asInstanceOf[Any ⇒ Unit])
|
||||
}
|
||||
|
|
@ -358,7 +358,7 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
}
|
||||
|
||||
@deprecated("use persistAllAsync instead", "2.4")
|
||||
final def persistAsync[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit =
|
||||
def persistAsync[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit =
|
||||
persistAllAsync(events)(handler)
|
||||
|
||||
/**
|
||||
|
|
@ -378,7 +378,7 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
* @param event event to be handled in the future, when preceding persist operations have been processes
|
||||
* @param handler handler for the given `event`
|
||||
*/
|
||||
final def deferAsync[A](event: A)(handler: A ⇒ Unit): Unit = {
|
||||
def deferAsync[A](event: A)(handler: A ⇒ Unit): Unit = {
|
||||
if (pendingInvocations.isEmpty) {
|
||||
handler(event)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ abstract class UntypedPersistentActor extends UntypedActor with Eventsourced wit
|
|||
* @param event event to be persisted.
|
||||
* @param handler handler for each persisted `event`
|
||||
*/
|
||||
final def persist[A](event: A, handler: Procedure[A]): Unit =
|
||||
def persist[A](event: A, handler: Procedure[A]): Unit =
|
||||
persist(event)(event ⇒ handler(event))
|
||||
|
||||
/**
|
||||
|
|
@ -146,11 +146,11 @@ abstract class UntypedPersistentActor extends UntypedActor with Eventsourced wit
|
|||
* @param events events to be persisted.
|
||||
* @param handler handler for each persisted `events`
|
||||
*/
|
||||
final def persistAll[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
def persistAll[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
persistAll(Util.immutableSeq(events))(event ⇒ handler(event))
|
||||
|
||||
@deprecated("use persistAll instead", "2.4")
|
||||
final def persist[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
def persist[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
persistAll(events, handler)
|
||||
|
||||
/**
|
||||
|
|
@ -176,7 +176,7 @@ abstract class UntypedPersistentActor extends UntypedActor with Eventsourced wit
|
|||
* @param event event to be persisted
|
||||
* @param handler handler for each persisted `event`
|
||||
*/
|
||||
final def persistAsync[A](event: A)(handler: Procedure[A]): Unit =
|
||||
def persistAsync[A](event: A)(handler: Procedure[A]): Unit =
|
||||
super[Eventsourced].persistAsync(event)(event ⇒ handler(event))
|
||||
|
||||
/**
|
||||
|
|
@ -187,7 +187,7 @@ abstract class UntypedPersistentActor extends UntypedActor with Eventsourced wit
|
|||
* @param events events to be persisted
|
||||
* @param handler handler for each persisted `events`
|
||||
*/
|
||||
final def persistAllAsync[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
def persistAllAsync[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
super[Eventsourced].persistAllAsync(Util.immutableSeq(events))(event ⇒ handler(event))
|
||||
|
||||
/**
|
||||
|
|
@ -207,7 +207,7 @@ abstract class UntypedPersistentActor extends UntypedActor with Eventsourced wit
|
|||
* @param event event to be handled in the future, when preceding persist operations have been processes
|
||||
* @param handler handler for the given `event`
|
||||
*/
|
||||
final def deferAsync[A](event: A)(handler: Procedure[A]): Unit =
|
||||
def deferAsync[A](event: A)(handler: Procedure[A]): Unit =
|
||||
super[Eventsourced].deferAsync(event)(event ⇒ handler(event))
|
||||
|
||||
/**
|
||||
|
|
@ -266,7 +266,7 @@ abstract class AbstractPersistentActor extends AbstractActor with PersistentActo
|
|||
* @param event event to be persisted.
|
||||
* @param handler handler for each persisted `event`
|
||||
*/
|
||||
final def persist[A](event: A, handler: Procedure[A]): Unit =
|
||||
def persist[A](event: A, handler: Procedure[A]): Unit =
|
||||
persist(event)(event ⇒ handler(event))
|
||||
|
||||
/**
|
||||
|
|
@ -277,11 +277,11 @@ abstract class AbstractPersistentActor extends AbstractActor with PersistentActo
|
|||
* @param events events to be persisted.
|
||||
* @param handler handler for each persisted `events`
|
||||
*/
|
||||
final def persistAll[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
def persistAll[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
persistAll(Util.immutableSeq(events))(event ⇒ handler(event))
|
||||
|
||||
@deprecated("use persistAll instead", "2.4")
|
||||
final def persist[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
def persist[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
persistAll(events, handler)
|
||||
|
||||
/**
|
||||
|
|
@ -302,7 +302,7 @@ abstract class AbstractPersistentActor extends AbstractActor with PersistentActo
|
|||
* @param event event to be persisted
|
||||
* @param handler handler for each persisted `event`
|
||||
*/
|
||||
final def persistAsync[A](event: A, handler: Procedure[A]): Unit =
|
||||
def persistAsync[A](event: A, handler: Procedure[A]): Unit =
|
||||
persistAsync(event)(event ⇒ handler(event))
|
||||
|
||||
/**
|
||||
|
|
@ -313,11 +313,11 @@ abstract class AbstractPersistentActor extends AbstractActor with PersistentActo
|
|||
* @param events events to be persisted
|
||||
* @param handler handler for each persisted `events`
|
||||
*/
|
||||
final def persistAllAsync[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
def persistAllAsync[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
persistAllAsync(Util.immutableSeq(events))(event ⇒ handler(event))
|
||||
|
||||
@deprecated("use persistAllAsync instead", "2.4")
|
||||
final def persistAsync[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
def persistAsync[A](events: JIterable[A], handler: Procedure[A]): Unit =
|
||||
persistAllAsync(events, handler)
|
||||
|
||||
/**
|
||||
|
|
@ -337,7 +337,7 @@ abstract class AbstractPersistentActor extends AbstractActor with PersistentActo
|
|||
* @param event event to be handled in the future, when preceding persist operations have been processes
|
||||
* @param handler handler for the given `event`
|
||||
*/
|
||||
final def deferAsync[A](event: A)(handler: Procedure[A]): Unit =
|
||||
def deferAsync[A](event: A)(handler: Procedure[A]): Unit =
|
||||
super.deferAsync(event)(event ⇒ handler(event))
|
||||
|
||||
override def receive = super[PersistentActor].receive
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue