Class RollingUpgradeManager


  • @MBean(objectName="RollingUpgradeManager",
           description="Handles the migration of data when upgrading between versions.")
    public class RollingUpgradeManager
    extends Object
    RollingUpgradeManager handles the synchronization of data between Infinispan clusters when performing rolling upgrades.
    Since:
    5.2
    Author:
    Manik Surtani, Tristan Tarrant
    • Constructor Detail

      • RollingUpgradeManager

        public RollingUpgradeManager()
    • Method Detail

      • start

        public void start()
      • synchronizeData

        @ManagedOperation(description="Synchronizes data from source clusters to target clusters with the specified migrator.",
                          displayName="Synchronizes data from source clusters to target clusters with the specified migrator.")
        public long synchronizeData​(@Parameter(name="migratorName",description="Specifies the name of the migrator to use. Set hotrod as the value unless using custom migrators.")
                                    String migratorName)
                             throws Exception
        Throws:
        Exception
      • synchronizeData

        @ManagedOperation(description="Synchronizes data from source clusters to target clusters with the specified migrator.",
                          displayName="Synchronizes data from source clusters to target clusters with the specified migrator.")
        public long synchronizeData​(@Parameter(name="migratorName",description="Specifies the name of the migrator to use. Set hotrod as the value unless using custom migrators.")
                                    String migratorName,
                                    @Parameter(name="readBatch",description="Specifies how many entries to read at a time from source clusters. Default is 10000.")
                                    int readBatch,
                                    @Parameter(name="threads",description="Specifies the number of threads to use per node when writing data to target clusters. Defaults to number of available processors.")
                                    int threads)
                             throws Exception
        Throws:
        Exception
      • disconnectSource

        @ManagedOperation(description="Disconnects target clusters from source clusters.",
                          displayName="Disconnects target clusters from source clusters.")
        public void disconnectSource​(@Parameter(name="migratorName",description="Specifies the name of the migrator to use. Set hotrod as the value unless using custom migrators.")
                                     String migratorName)
                              throws Exception
        Throws:
        Exception
      • connectSource

        @ManagedOperation(description="Connects target clusters to source clusters.",
                          displayName="Connects target clusters from source clusters.")
        public void connectSource​(@Parameter(name="migratorName",description="Specifies the name of the migrator to use. Set hotrod as the value unless using custom migrators.")
                                  String migratorName,
                                  @Parameter(name="configuration",description="Specifies the configuration of the remote store to add, in JSON format.")
                                  StoreConfiguration configuration)
                           throws Exception
        Throws:
        Exception
      • isConnected

        @ManagedOperation(description="Checks if the target cluster is connected to the source cluster.",
                          displayName="Checks if the target cluster is connected to the source cluster.")
        public boolean isConnected​(@Parameter(name="migratorName",description="Specifies the name of the migrator to use. Set hotrod as the value unless using custom migrators.")
                                   String migratorName)
                            throws Exception
        Throws:
        Exception