Class Ignite2ClusterContainer
java.lang.Object
org.apache.ignite.migrationtools.tests.containers.Ignite2ClusterContainer
- All Implemented Interfaces:
AutoCloseable,org.testcontainers.lifecycle.Startable
public class Ignite2ClusterContainer
extends Object
implements org.testcontainers.lifecycle.Startable
Container of an Ignite 2 cluster.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIgnite2ClusterContainer(Path cfgFilePath, @Nullable Path storagePathOnHost, List<String> nodeIds) Ignite2ClusterContainer(org.testcontainers.containers.Network network, Path cfgFilePath, @Nullable Path storagePathOnHost, List<String> nodeIds) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns docker host address.voiddoStop(boolean waitForCheckpoints) Stop the cluster.org.testcontainers.containers.Networkvoidstart()voidstop()intReturns host's port which can be used for thin client connection.voidWaits for the next checkpoint to happen.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testcontainers.lifecycle.Startable
close, getDependencies
-
Field Details
-
network
public final org.testcontainers.containers.Network network
-
-
Constructor Details
-
Ignite2ClusterContainer
-
Ignite2ClusterContainer
public Ignite2ClusterContainer(org.testcontainers.containers.Network network, Path cfgFilePath, @Nullable @Nullable Path storagePathOnHost, List<String> nodeIds) Constructor.- Parameters:
network- Network.cfgFilePath- Configuration Path.storagePathOnHost- Storage path mounted on the host.nodeIds- List of node consistent ids.
-
-
Method Details
-
getNetwork
public org.testcontainers.containers.Network getNetwork() -
start
public void start()- Specified by:
startin interfaceorg.testcontainers.lifecycle.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.testcontainers.lifecycle.Startable
-
doStop
public void doStop(boolean waitForCheckpoints) Stop the cluster.- Parameters:
waitForCheckpoints- Whether should wait for checkpoints to be finished or not.
-
waitForNextCheckpoint
Waits for the next checkpoint to happen.TODO: https://issues.apache.org/jira/browse/IGNITE-26177
- Throws:
InterruptedException- when the thread was interrupted while waiting.
-
thinClientMappedPort
public int thinClientMappedPort()Returns host's port which can be used for thin client connection.- Returns:
- Host's port for thin client connection.
-
dockerHost
Returns docker host address.- Returns:
- Docker host address.
-