Package akka.persistence
Class Persistence
- java.lang.Object
-
- akka.persistence.Persistence
-
- All Implemented Interfaces:
Extension
public class Persistence extends java.lang.Object implements Extension
INTERNAL API: When starting many persistent actors at the same time the journal its data store is protected from being overloaded by limiting number of recoveries that can be in progress at the same time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Persistence.PluginHolder
INTERNAL API.static class
Persistence.PluginHolder$
-
Constructor Summary
Constructors Constructor Description Persistence(ExtendedActorSystem system)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EventAdapters
adaptersFor(ActorRef journalPluginActor)
INTERNAL API Looks upEventAdapters
by journal plugin's ActorRef.EventAdapters
adaptersFor(java.lang.String journalPluginId)
Returns anEventAdapters
object which serves as a per-journal collection of bound event adapters.EventAdapters
adaptersFor(java.lang.String journalPluginId, com.typesafe.config.Config journalPluginConfig)
Returns anEventAdapters
object which serves as a per-journal collection of bound event adapters.static T
apply(ActorSystem system)
static T
apply(ClassicActorSystemProvider system)
com.typesafe.config.Config
configFor(ActorRef journalPluginActor)
INTERNAL API Looks up the plugin config by plugin's ActorRef.static Persistence
createExtension(ExtendedActorSystem system)
StashOverflowStrategy
defaultInternalStashOverflowStrategy()
static boolean
equals(java.lang.Object other)
static Persistence
get(ActorSystem system)
static Persistence
get(ClassicActorSystemProvider system)
static int
hashCode()
com.typesafe.config.Config
journalConfigFor(java.lang.String journalPluginId, com.typesafe.config.Config journalPluginConfig)
INTERNAL API Returns the plugin config identified bypluginId
.com.typesafe.config.Config
journalConfigFor$default$2()
static java.lang.String
JournalFallbackConfigPath()
ActorRef
journalFor(java.lang.String journalPluginId, com.typesafe.config.Config journalPluginConfig)
INTERNAL API Returns a journal plugin actor identified byjournalPluginId
.com.typesafe.config.Config
journalFor$default$2()
static Persistence$
lookup()
java.lang.String
persistenceId(ActorRef persistentActor)
Creates a canonical persistent actor id from a persistent actor ref.ActorRef
recoveryPermitter()
INTERNAL API: When starting many persistent actors at the same time the journal its data store is protected from being overloaded by limiting number of recoveries that can be in progress at the same time.PersistenceSettings
settings()
static java.lang.String
SnapshotStoreFallbackConfigPath()
Config path to fall-back to if a setting is not defined in a specific snapshot plugin's config sectionActorRef
snapshotStoreFor(java.lang.String snapshotPluginId, com.typesafe.config.Config snapshotPluginConfig)
INTERNAL APIcom.typesafe.config.Config
snapshotStoreFor$default$2()
ExtendedActorSystem
system()
static void
verifyPluginConfigExists(com.typesafe.config.Config config, java.lang.String pluginId, java.lang.String pluginType)
INTERNAL APIstatic void
verifyPluginConfigIsDefined(java.lang.String pluginId, java.lang.String pluginType)
INTERNAL API
-
-
-
Constructor Detail
-
Persistence
public Persistence(ExtendedActorSystem system)
-
-
Method Detail
-
get
public static Persistence get(ActorSystem system)
-
get
public static Persistence get(ClassicActorSystemProvider system)
-
createExtension
public static Persistence createExtension(ExtendedActorSystem system)
-
lookup
public static Persistence$ lookup()
-
JournalFallbackConfigPath
public static java.lang.String JournalFallbackConfigPath()
-
SnapshotStoreFallbackConfigPath
public static java.lang.String SnapshotStoreFallbackConfigPath()
Config path to fall-back to if a setting is not defined in a specific snapshot plugin's config section
-
verifyPluginConfigExists
public static void verifyPluginConfigExists(com.typesafe.config.Config config, java.lang.String pluginId, java.lang.String pluginType)
INTERNAL API- Parameters:
config
- (undocumented)pluginId
- (undocumented)pluginType
- (undocumented)- Throws:
java.lang.IllegalArgumentException
- if config path for thepluginId
doesn't exist
-
verifyPluginConfigIsDefined
public static void verifyPluginConfigIsDefined(java.lang.String pluginId, java.lang.String pluginType)
INTERNAL API- Parameters:
pluginId
- (undocumented)pluginType
- (undocumented)- Throws:
java.lang.IllegalArgumentException
- ifpluginId
is empty (undefined)
-
apply
public static T apply(ActorSystem system)
-
apply
public static T apply(ClassicActorSystemProvider system)
-
hashCode
public static final int hashCode()
-
equals
public static final boolean equals(java.lang.Object other)
-
system
public ExtendedActorSystem system()
-
recoveryPermitter
public ActorRef recoveryPermitter()
INTERNAL API: When starting many persistent actors at the same time the journal its data store is protected from being overloaded by limiting number of recoveries that can be in progress at the same time.- Returns:
- (undocumented)
-
defaultInternalStashOverflowStrategy
public StashOverflowStrategy defaultInternalStashOverflowStrategy()
-
settings
public PersistenceSettings settings()
-
adaptersFor
public final EventAdapters adaptersFor(java.lang.String journalPluginId)
Returns anEventAdapters
object which serves as a per-journal collection of bound event adapters. If no adapters are registered for a given journal the EventAdapters object will simply return the identity adapter for each class, otherwise the most specific adapter matching a given class will be returned.- Parameters:
journalPluginId
- (undocumented)- Returns:
- (undocumented)
-
adaptersFor
public final EventAdapters adaptersFor(java.lang.String journalPluginId, com.typesafe.config.Config journalPluginConfig)
Returns anEventAdapters
object which serves as a per-journal collection of bound event adapters. If no adapters are registered for a given journal the EventAdapters object will simply return the identity adapter for each class, otherwise the most specific adapter matching a given class will be returned.The provided journalPluginConfig will be used to configure the plugin instead of the actor system config.
- Parameters:
journalPluginId
- (undocumented)journalPluginConfig
- (undocumented)- Returns:
- (undocumented)
-
adaptersFor
public final EventAdapters adaptersFor(ActorRef journalPluginActor)
INTERNAL API Looks upEventAdapters
by journal plugin's ActorRef.- Parameters:
journalPluginActor
- (undocumented)- Returns:
- (undocumented)
-
journalConfigFor
public final com.typesafe.config.Config journalConfigFor(java.lang.String journalPluginId, com.typesafe.config.Config journalPluginConfig)
INTERNAL API Returns the plugin config identified bypluginId
. When empty, looks inakka.persistence.journal.plugin
to find configuration entry path. When configured, usesjournalPluginId
as absolute path to the journal configuration entry.- Parameters:
journalPluginId
- (undocumented)journalPluginConfig
- (undocumented)- Returns:
- (undocumented)
-
journalConfigFor$default$2
public final com.typesafe.config.Config journalConfigFor$default$2()
-
configFor
public final com.typesafe.config.Config configFor(ActorRef journalPluginActor)
INTERNAL API Looks up the plugin config by plugin's ActorRef.- Parameters:
journalPluginActor
- (undocumented)- Returns:
- (undocumented)
-
journalFor
public final ActorRef journalFor(java.lang.String journalPluginId, com.typesafe.config.Config journalPluginConfig)
INTERNAL API Returns a journal plugin actor identified byjournalPluginId
. When empty, looks inakka.persistence.journal.plugin
to find configuration entry path. When configured, usesjournalPluginId
as absolute path to the journal configuration entry. Configuration entry must contain few required fields, such asclass
. Seesrc/main/resources/reference.conf
.- Parameters:
journalPluginId
- (undocumented)journalPluginConfig
- (undocumented)- Returns:
- (undocumented)
-
journalFor$default$2
public final com.typesafe.config.Config journalFor$default$2()
-
snapshotStoreFor
public final ActorRef snapshotStoreFor(java.lang.String snapshotPluginId, com.typesafe.config.Config snapshotPluginConfig)
INTERNAL APIReturns a snapshot store plugin actor identified by
snapshotPluginId
. When empty, looks inakka.persistence.snapshot-store.plugin
to find configuration entry path. When configured, usessnapshotPluginId
as absolute path to the snapshot store configuration entry. Configuration entry must contain few required fields, such asclass
. Seesrc/main/resources/reference.conf
.- Parameters:
snapshotPluginId
- (undocumented)snapshotPluginConfig
- (undocumented)- Returns:
- (undocumented)
-
snapshotStoreFor$default$2
public final com.typesafe.config.Config snapshotStoreFor$default$2()
-
persistenceId
public java.lang.String persistenceId(ActorRef persistentActor)
Creates a canonical persistent actor id from a persistent actor ref.
-
-