Class 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 scala.concurrent.Future<Done> initializeDefaultPlugins​(ClassicActorSystemProvider system, scala.concurrent.duration.FiniteDuration timeout)
      Initialize the default journal and snapshot plugins.
      static scala.concurrent.Future<Done> initializePlugins​(ClassicActorSystemProvider system, java.lang.String journalPluginId, java.lang.String snapshotPluginId, scala.concurrent.duration.FiniteDuration timeout)
      Initialize the given journal and snapshot plugins.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PersistenceInit

        public PersistenceInit()
    • Method Detail

      • initializeDefaultPlugins

        public static scala.concurrent.Future<Done> initializeDefaultPlugins​(ClassicActorSystemProvider system,
                                                                             scala.concurrent.duration.FiniteDuration timeout)
        Initialize the default journal and snapshot plugins.

        Returns:
        a Future that is completed when the initialization has completed
      • initializePlugins

        public static scala.concurrent.Future<Done> initializePlugins​(ClassicActorSystemProvider system,
                                                                      java.lang.String journalPluginId,
                                                                      java.lang.String snapshotPluginId,
                                                                      scala.concurrent.duration.FiniteDuration timeout)
        Initialize the given journal and snapshot plugins.

        The snapshotPluginId can be empty ("") if snapshot plugin isn't used.

        Returns:
        a Future that is completed when the initialization has completed