Class ClusterUtils


  • public final class ClusterUtils
    extends java.lang.Object
    Utilities 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.ClusterUtils class

    • 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>
      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.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 instance
        fn - 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 instance
        fn - 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