Class ClusterNodeImpl

java.lang.Object
com.atlassian.crowd.manager.cluster.ClusterNodeImpl
All Implemented Interfaces:
ClusterNode

public class ClusterNodeImpl extends Object implements ClusterNode
  • Constructor Details

  • Method Details

    • getNodeId

      public String getNodeId()
      Description copied from interface: ClusterNode
      Retrieves a cluster-wide unique identifier for this node.

      Warning: Plugins should make no assumptions about this ID. That includes:

      • How long it is
      • What characters it contains
      • Whether it will be consistent across restarts. Don't persist long-term data against these IDs
      The value is guaranteed to be unique within the cluster. If the cluster is restarted, every node's ID will still be unique but will likely not be the same as the previous value.
      Specified by:
      getNodeId in interface ClusterNode
      Returns:
      a cluster-wide unique identifier for this node
    • getLastHeartbeat

      public Instant getLastHeartbeat()
      Specified by:
      getLastHeartbeat in interface ClusterNode
      Returns:
      the time when the node has last checked-in as available
    • isLocal

      public boolean isLocal()
      Specified by:
      isLocal in interface ClusterNode
      Returns:
      true if this represents the node the method is executed on, false otherwise
    • getNodeName

      public String getNodeName()
      Description copied from interface: ClusterNode
      A long living cluster name that is defined by setting the system property cluster.node.name
      Specified by:
      getNodeName in interface ClusterNode
      Returns:
      The value from the system property named above otherwise an empty string if the property is not set.
    • getDetails

      public Optional<ClusterNodeDetails> getDetails()
      Specified by:
      getDetails in interface ClusterNode
      Returns:
      extra details about the cluster node, the presence and completeness of this data is implementation specific, and not guaranteed
    • builder

      public static ClusterNodeImpl.Builder builder()
    • builder

      public static ClusterNodeImpl.Builder builder(ClusterNode data)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object