Class ClusterUtils
- java.lang.Object
-
- org.apache.cassandra.testing.utils.ClusterUtils
-
public final class ClusterUtils extends java.lang.ObjectUtilities for working with jvm-dtest clusters.This class should never be called from within the cluster, always in the App ClassLoader.
Parts of this class are copied from Cassandra's
org.apache.cassandra.distributed.shared.ClusterUtilsclass
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusterUtils.RingInstanceDetails
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<ClusterUtils.RingInstanceDetails>ring(org.apache.cassandra.distributed.api.IInstance instance)Get the ring from the perspective of the instance.static <I extends org.apache.cassandra.distributed.api.IInstance>
Istart(I instance, java.util.function.BiConsumer<I,WithProperties> fn)Start the instance with the given System Properties, after the instance has started, the properties will be cleared.static <I extends org.apache.cassandra.distributed.api.IInstance>
Istart(I instance, java.util.function.Consumer<WithProperties> fn)Start the instance with the given System Properties, after the instance has started, the properties will be cleared.
-
-
-
Method Detail
-
start
public static <I extends org.apache.cassandra.distributed.api.IInstance> I start(I instance, java.util.function.Consumer<WithProperties> fn)Start the instance with the given System Properties, after the instance has started, the properties will be cleared.- Type Parameters:
I- the concrete instance type- Parameters:
instance- the instancefn- the consumer function- Returns:
- the started instance
-
start
public static <I extends org.apache.cassandra.distributed.api.IInstance> I start(I instance, java.util.function.BiConsumer<I,WithProperties> fn)Start the instance with the given System Properties, after the instance has started, the properties will be cleared.- Type Parameters:
I- the concrete instance type- Parameters:
instance- the instancefn- the bi-consumer function- Returns:
- the started instance
-
ring
public static java.util.List<ClusterUtils.RingInstanceDetails> ring(org.apache.cassandra.distributed.api.IInstance instance)
Get the ring from the perspective of the instance.- Parameters:
instance- the instance- Returns:
- a list with the parsed ring results
-
-