Interface CoordinationContext

    • Method Detail

      • isCoordinator

        boolean isCoordinator()
        Returns true if local node is the coordinator.
        Returns:
        true if local node is the coordinator.
      • coordinator

        CoordinationMember coordinator()
        Returns the coordinator.
        Returns:
        Coordinator.
      • topology

        ClusterTopology topology()
        Returns the cluster topology of this coordination process.
        Returns:
        Cluster topology.
      • isCancelled

        boolean isCancelled()
        Returns true if this coordination process was cancelled.
        Returns:
        true if this coordination process was cancelled.
      • localMember

        CoordinationMember localMember()
        Returns the local node member.
        Returns:
        Local node.
      • members

        List<CoordinationMember> members()
        Returns all members of this coordination process.
        Returns:
        Coordination members.
      • memberOf

        CoordinationMember memberOf​(ClusterNode node)
        Returns member by its cluster node.
        Parameters:
        node - Cluster node.
        Returns:
        Member or null if there is no such member.
      • memberOf

        CoordinationMember memberOf​(ClusterNodeId nodeId)
        Returns member by its cluster node identifier.
        Parameters:
        nodeId - Cluster node identifier.
        Returns:
        Member or null if there is no such member.
      • getAttachment

        Object getAttachment()
        Returns a user-defined object that is attached to this context (see setAttachment(Object)).
        Returns:
        Attachment.
      • setAttachment

        void setAttachment​(Object attachment)
        Sets the user-defined object that should be attached to this context.
        Parameters:
        attachment - Attachment.