Package org.gridgain.internal.dcr
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
Base implementation of
DcrManager.-
Field Summary
Fields inherited from interface org.apache.ignite.internal.lang.Debuggable
INDENTATION -
Constructor Summary
ConstructorsConstructorDescriptionDcrManagerImpl(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. -
Method Summary
Modifier and TypeMethodDescriptioncreateReplication(ReplicationOptions options, boolean instantStart) Creates replication with provided options.flushReplication(String name, Instant timestamp) Specifies timestamp for replication which will be used as flush point.Returns all replication info.removeReplication(String name) Removes replication with provided identifier.CompletableFuture<@Nullable ReplicationInfo>showReplication(String name) Returns replication info.startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) startReplication(String name, String schema, @Nullable List<String> tables, boolean allTables) Starts replication.stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) stopReplication(String name, String schema, @Nullable List<String> tables, boolean allTables) Stops replication with provided replication identifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.ignite.internal.lang.Debuggable
dumpStateMethods inherited from interface org.apache.ignite.internal.manager.IgniteComponent
beforeNodeStop, stopAsync
-
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:DcrManagerCreates replication with provided options.- Specified by:
createReplicationin interfaceDcrManager- 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:DcrManagerStarts replication.- Specified by:
startReplicationin interfaceDcrManager- Parameters:
name- Replication name.schema- schema, default is PUBLICtables- list of table namesallTables- Iftrue, all tables will be replicated.- Returns:
- Future with
truevalue if replication successfully started.
-
stopReplication
public CompletableFuture<Boolean> stopReplication(String name, String schema, @Nullable @Nullable List<String> tables, boolean allTables) Description copied from interface:DcrManagerStops replication with provided replication identifier.- Specified by:
stopReplicationin interfaceDcrManager- Parameters:
name- Replication name.schema- schema, default is PUBLICtables- list of table namesallTables- Iftrue, all tables will be replicated.- Returns:
- Future with
trueif replication stopped successfully.
-
removeReplication
Description copied from interface:DcrManagerRemoves replication with provided identifier.- Specified by:
removeReplicationin interfaceDcrManager- Parameters:
name- Replication name.- Returns:
- Completed future if replication removed successfully.
-
showReplication
Description copied from interface:DcrManagerReturns replication info.- Specified by:
showReplicationin interfaceDcrManager- Parameters:
name- replication name.- Returns:
- Future with
ReplicationInfoif replication exist, null otherwise.
-
listReplications
Description copied from interface:DcrManagerReturns all replication info.- Specified by:
listReplicationsin interfaceDcrManager- Returns:
- Future with collection of all
ReplicationInfo
-
flushReplication
Description copied from interface:DcrManagerSpecifies 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:
flushReplicationin interfaceDcrManager- 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:
startAsyncin interfaceorg.apache.ignite.internal.manager.IgniteComponent
-
stopAsync
public CompletableFuture<Void> stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) - Specified by:
stopAsyncin interfaceorg.apache.ignite.internal.manager.IgniteComponent
-