Class PersistenceInit
- java.lang.Object
-
- org.apache.pekko.persistence.testkit.javadsl.PersistenceInit
-
public class PersistenceInit extends java.lang.Object
Test utility to initialize persistence plugins. Useful when initialization order or coordination is needed. For example to avoid creating tables concurrently.
-
-
Constructor Summary
Constructors Constructor Description PersistenceInit()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.concurrent.CompletionStage<Done>
initializeDefaultPlugins(ClassicActorSystemProvider system, java.time.Duration timeout)
Initialize the default journal and snapshot plugins.static java.util.concurrent.CompletionStage<Done>
initializePlugins(ClassicActorSystemProvider system, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.time.Duration timeout)
Initialize the given journal and snapshot plugins.
-
-
-
Method Detail
-
initializeDefaultPlugins
public static java.util.concurrent.CompletionStage<Done> initializeDefaultPlugins(ClassicActorSystemProvider system, java.time.Duration timeout)
Initialize the default journal and snapshot plugins.- Returns:
- a
CompletionStage
that is completed when the initialization has completed
-
initializePlugins
public static java.util.concurrent.CompletionStage<Done> initializePlugins(ClassicActorSystemProvider system, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.time.Duration timeout)
Initialize the given journal and snapshot plugins.The
snapshotPluginId
can be empty (""
) if snapshot plugin isn't used.- Returns:
- a
CompletionStage
that is completed when the initialization has completed
-
-