Package org.gridgain.internal.dcr
Class Replication
java.lang.Object
org.gridgain.internal.dcr.Replication
Replication representation instance.
-
Constructor Summary
ConstructorsConstructorDescriptionReplication(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidSets flush point for replication.start(ReplicationEventHandler<ReplicationEvent> handler, ReplicationStartOptions startOptions) Start replication.Stop replication for particular tables.stopAll()Stops replication for every table in this replication.
-
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-tableWatermarkPersisters 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
public CompletableFuture<Void> start(ReplicationEventHandler<ReplicationEvent> handler, ReplicationStartOptions startOptions) Start replication. Watermarks for the tables are fetched fromDcrStorageon each call, so the caller does not have to plumb them throughReplicationStartOptions.- Parameters:
handler- Replication events handler.startOptions- Start options.
-
flush
Sets flush point for replication.- Parameters:
flushPoint- Timestamp which will be used as flush point for replication.
-
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
Stop replication for particular tables.- Returns:
- future that completes when every flushed table's watermark has been persisted.
-
replicationNodeInfo
-