Class ClusterDescription


  • public class ClusterDescription
    extends Object
    A detailed description of the cluster
    • Constructor Detail

      • ClusterDescription

        public ClusterDescription()
        Constructor
      • ClusterDescription

        public ClusterDescription​(String clusterId,
                                  Node controller,
                                  List<Node> nodes,
                                  Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
        Constructor
        Parameters:
        clusterId - The cluster ID.
        controller - The controller node.
        nodes - A collection of nodes belonging to this cluster.
        authorizedOperations - A collection of authorized operations on this cluster.
      • ClusterDescription

        public ClusterDescription​(JsonObject json)
        Constructor (from JSON representation)
        Parameters:
        json - JSON representation
    • Method Detail

      • getNodes

        public List<Node> getNodes()
        Returns:
        the nodes belonging to this cluster.
      • setNodes

        public ClusterDescription setNodes​(List<Node> nodes)
        Set the nodes belonging to this cluster
        Parameters:
        nodes - the nodes
        Returns:
        current instance of the class to be fluent
      • addNode

        public ClusterDescription addNode​(Node node)
        Add a node belonging to this cluster to the current node list.
        Parameters:
        node - the node to add
        Returns:
        current instance of the class to be fluent
      • getController

        public Node getController()
        Returns:
        the controller node.
      • setController

        public ClusterDescription setController​(Node controller)
        Set the controller node.
        Parameters:
        controller - the controller node
        Returns:
        current instance of the class to be fluent
      • getClusterId

        public String getClusterId()
        Returns:
        the cluster ID
      • setClusterId

        public ClusterDescription setClusterId​(String clusterId)
        Set the cluster ID
        Parameters:
        clusterId -
        Returns:
        current instance of the class to be fluent
      • getAuthorizedOperations

        public Set<org.apache.kafka.common.acl.AclOperation> getAuthorizedOperations()
        Returns:
        the authorizedOperations
      • setAuthorizedOperations

        public ClusterDescription setAuthorizedOperations​(Set<org.apache.kafka.common.acl.AclOperation> authorizedOperations)
        Set the authorizedOperations
        Parameters:
        authorizedOperations -
        Returns:
        current instance of the class to be fluent
      • toJson

        public JsonObject toJson()
        Convert object to JSON representation
        Returns:
        JSON representation