|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.persistence.PersistentChannel
public final class PersistentChannel
A PersistentChannel
implements the same functionality as a Channel
but additionally persists
Deliver
requests before they are served. Persistent channels are useful in combination with slow
destinations or destinations that are unavailable for a long time. Deliver
requests that have been
persisted by a persistent channel are deleted when destinations confirm the receipt of the corresponding
messages.
The number of pending confirmations can be limited by a persistent channel based on the parameters of
PersistentChannelSettings
. It can suspend delivery when the number of pending confirmations reaches
pendingConfirmationsMax
and resume delivery again when this number falls below pendingConfirmationsMin
.
This prevents both flooding destinations with more messages than they can process and unlimited memory
consumption by the channel. A persistent channel continues to persist Deliver
request even when
message delivery is temporarily suspended.
A persistent channel can also reply to Deliver
senders if the request has been successfully persisted
or not (see replyPersistent
parameter in PersistentChannelSettings
). In case of success, the channel
replies with the contained Persistent
message, otherwise with a PersistenceFailure
message.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface akka.actor.Actor |
---|
Actor.emptyBehavior$ |
Constructor Summary | |
---|---|
PersistentChannel(scala.Option<java.lang.String> _channelId,
PersistentChannelSettings channelSettings)
|
Method Summary | |
---|---|
static Props |
props()
Returns a channel actor configuration object for creating a PersistentChannel with a
generated id and default PersistentChannelSettings . |
static Props |
props(PersistentChannelSettings channelSettings)
Returns a channel actor configuration object for creating a PersistentChannel with a
generated id and specified channelSettings . |
static Props |
props(java.lang.String channelId)
Returns a channel actor configuration object for creating a PersistentChannel with the
specified id and default PersistentChannelSettings . |
static Props |
props(java.lang.String channelId,
PersistentChannelSettings channelSettings)
Returns a channel actor configuration object for creating a PersistentChannel with the
specified id and specified channelSettings . |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive()
This defines the initial actor behavior, it must return a partial function with the actor logic. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.actor.Actor |
---|
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, postStop, preRestart, preStart, self, sender, supervisorStrategy, unhandled |
Constructor Detail |
---|
public PersistentChannel(scala.Option<java.lang.String> _channelId, PersistentChannelSettings channelSettings)
Method Detail |
---|
public static Props props()
PersistentChannel
with a
generated id and default PersistentChannelSettings
.
public static Props props(PersistentChannelSettings channelSettings)
PersistentChannel
with a
generated id and specified channelSettings
.
channelSettings
- channel configuration object.
public static Props props(java.lang.String channelId)
PersistentChannel
with the
specified id and default PersistentChannelSettings
.
channelId
- channel id.
public static Props props(java.lang.String channelId, PersistentChannelSettings channelSettings)
PersistentChannel
with the
specified id and specified channelSettings
.
channelId
- channel id.channelSettings
- channel configuration object.
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Actor
receive
in interface Actor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |