Class DcrManagerImpl

java.lang.Object
org.gridgain.internal.dcr.DcrManagerImpl
All Implemented Interfaces:
org.apache.ignite.internal.lang.Debuggable, org.apache.ignite.internal.manager.IgniteComponent, DcrManager

public class DcrManagerImpl extends Object implements DcrManager
Base implementation of DcrManager.
  • Constructor Details

    • DcrManagerImpl

      public DcrManagerImpl(String nodeName, CompletableFuture<String> clusterNameFuture, org.apache.ignite.table.IgniteTables tables, org.apache.ignite.internal.metastorage.MetaStorageManager metaStorageManager, org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyService logicalTopology, org.apache.ignite.internal.network.MessagingService messagingService, org.apache.ignite.internal.network.TopologyService topologyService, org.apache.ignite.internal.metrics.MetricManager metricManager, org.apache.ignite.internal.hlc.ClockService clockService)
      Constructor.
      Parameters:
      nodeName - Node name.
      clusterNameFuture - Cluster name future.
      tables - Ignite tables.
      metaStorageManager - Meta storage manager.
      logicalTopology - Logical topology service.
      messagingService - Messaging service.
      topologyService - Topology service.
      metricManager - Metric manager.
  • Method Details

    • createReplication

      public CompletableFuture<ReplicationInfo> createReplication(ReplicationOptions options, boolean instantStart)
      Description copied from interface: DcrManager
      Creates replication with provided options.
      Specified by:
      createReplication in interface DcrManager
      Parameters:
      options - Replication options.
      Returns:
      Future with replication info.
    • startReplication

      public CompletableFuture<Boolean> startReplication(String name, String schema, @Nullable @Nullable List<String> tables, boolean allTables)
      Description copied from interface: DcrManager
      Starts replication.
      Specified by:
      startReplication in interface DcrManager
      Parameters:
      name - Replication name.
      schema - schema, default is PUBLIC
      tables - list of table names
      allTables - If true, all tables will be replicated.
      Returns:
      Future with true value if replication successfully started.
    • stopReplication

      public CompletableFuture<Boolean> stopReplication(String name, String schema, @Nullable @Nullable List<String> tables, boolean allTables)
      Description copied from interface: DcrManager
      Stops replication with provided replication identifier.
      Specified by:
      stopReplication in interface DcrManager
      Parameters:
      name - Replication name.
      schema - schema, default is PUBLIC
      tables - list of table names
      allTables - If true, all tables will be replicated.
      Returns:
      Future with true if replication stopped successfully.
    • removeReplication

      public CompletableFuture<Boolean> removeReplication(String name)
      Description copied from interface: DcrManager
      Removes replication with provided identifier.
      Specified by:
      removeReplication in interface DcrManager
      Parameters:
      name - Replication name.
      Returns:
      Completed future if replication removed successfully.
    • showReplication

      public CompletableFuture<@Nullable ReplicationInfo> showReplication(String name)
      Description copied from interface: DcrManager
      Returns replication info.
      Specified by:
      showReplication in interface DcrManager
      Parameters:
      name - replication name.
      Returns:
      Future with ReplicationInfo if replication exist, null otherwise.
    • listReplications

      public CompletableFuture<Collection<ReplicationInfo>> listReplications()
      Description copied from interface: DcrManager
      Returns all replication info.
      Specified by:
      listReplications in interface DcrManager
      Returns:
      Future with collection of all ReplicationInfo
    • flushReplication

      public CompletableFuture<Boolean> flushReplication(String name, Instant timestamp)
      Description copied from interface: DcrManager
      Specifies timestamp for replication which will be used as flush point. The flush point is a timestamp that is used to determine whether the replicated data is sufficient. After setting a flush point, replication will be considered completed at the moment when all replicated tables have all received data older than this reset point.
      Specified by:
      flushReplication in interface DcrManager
      Parameters:
      name - Replication name.
      timestamp - Flush point.
      Returns:
      Completed future if replication flushed successfully.
    • startAsync

      public CompletableFuture<Void> startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
      Specified by:
      startAsync in interface org.apache.ignite.internal.manager.IgniteComponent
    • stopAsync

      public CompletableFuture<Void> stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
      Specified by:
      stopAsync in interface org.apache.ignite.internal.manager.IgniteComponent