Class Persistence

  • All Implemented Interfaces:
    Extension

    public class Persistence
    extends java.lang.Object
    implements Extension
    Persistence extension.
    • Method Detail

      • JournalFallbackConfigPath

        public static java.lang.String JournalFallbackConfigPath()
        Config path to fall-back to if a setting is not defined in a specific plugin's config section
      • 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
      • 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()
      • adaptersFor

        public final EventAdapters adaptersFor​(java.lang.String journalPluginId)
        Returns an EventAdapters 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 an EventAdapters 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 up EventAdapters 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 by pluginId. When empty, looks in akka.persistence.journal.plugin to find configuration entry path. When configured, uses journalPluginId 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 by journalPluginId. When empty, looks in akka.persistence.journal.plugin to find configuration entry path. When configured, uses journalPluginId as absolute path to the journal configuration entry. Configuration entry must contain few required fields, such as class. See src/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 API

        Returns a snapshot store plugin actor identified by snapshotPluginId. When empty, looks in akka.persistence.snapshot-store.plugin to find configuration entry path. When configured, uses snapshotPluginId as absolute path to the snapshot store configuration entry. Configuration entry must contain few required fields, such as class. See src/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.