Class Replication

java.lang.Object
org.gridgain.internal.dcr.Replication

public class Replication extends Object
Replication representation instance.
  • Constructor Details

    • Replication

      public Replication(String nodeName, String name, org.apache.ignite.table.IgniteTables tables, ReplicationStartOptions options, org.apache.ignite.internal.metrics.MetricManager metricManager, org.apache.ignite.internal.hlc.ClockService clockService, DcrStorage store, ScheduledExecutorService watermarkScheduler, LongSupplier watermarkPersistIntervalMillisSupplier)
      Constructor.
      Parameters:
      name - Replication name.
      nodeName - Node name.
      tables - Ignite tables.
      options - Replication options.
      metricManager - Metric manager.
      clockService - Clock service.
      store - DCR storage.
      watermarkScheduler - Scheduler used by per-table WatermarkPersisters to fire deferred writes once the interval gate expires. Owned by the DCR manager; not shut down here.
      watermarkPersistIntervalMillisSupplier - Cluster-wide minimum interval between watermark persists (millis). Re-read on every scheduling decision, so cluster-config hot updates take effect on the next write.
  • Method Details

    • start

      Start replication. Watermarks for the tables are fetched from DcrStorage on each call, so the caller does not have to plumb them through ReplicationStartOptions.
      Parameters:
      handler - Replication events handler.
      startOptions - Start options.
    • flush

      public void flush(Instant flushPoint)
      Sets flush point for replication.
      Parameters:
      flushPoint - Timestamp which will be used as flush point for replication.
    • stopAll

      public CompletableFuture<Void> stopAll()
      Stops replication for every table in this replication.
      Returns:
      future that completes when every table's watermark flush has finished. The synchronous part (cancelling FST executor, closing the client) runs before this method returns; the future tracks only the asynchronous watermark flush.
    • stop

      public CompletableFuture<Void> stop(List<String> tablesToStop)
      Stop replication for particular tables.
      Returns:
      future that completes when every flushed table's watermark has been persisted.
    • replicationNodeInfo

      public ReplicationNodeInfo replicationNodeInfo()