Class NodeDto

java.lang.Object
org.graylog2.cluster.nodes.NodeDto
All Implemented Interfaces:
Node, MongoEntity
Direct Known Subclasses:
DataNodeDto, ServerNodeDto

public abstract class NodeDto extends Object implements Node, MongoEntity
  • Constructor Details

    • NodeDto

      public NodeDto()
  • Method Details

    • id

      public String id()
      Description copied from interface: MongoEntity
      ID of the entity. Will be stored as field "_id" with type ObjectId in MongoDB.
      Specified by:
      id in interface MongoEntity
      Returns:
      Hex string representation of the entity's ID
    • getObjectId

      @Nullable public abstract String getObjectId()
    • getId

      public abstract String getId()
    • getNodeId

      public String getNodeId()
      Specified by:
      getNodeId in interface Node
    • getTransportAddress

      public abstract String getTransportAddress()
      Specified by:
      getTransportAddress in interface Node
    • getLastSeen

      @Nullable public abstract org.joda.time.DateTime getLastSeen()
      Specified by:
      getLastSeen in interface Node
    • getHostname

      @Nullable public abstract String getHostname()
      Specified by:
      getHostname in interface Node
    • isLeader

      public abstract boolean isLeader()
      Description copied from interface: Node
      Returns the current leader status of the node. This is only informational and should be used with care. To determine if the current node is acting as leader, use LeaderElectionService.isLeader() instead.
      Specified by:
      isLeader in interface Node
    • getShortNodeId

      public String getShortNodeId()
      Specified by:
      getShortNodeId in interface Node
    • toEntityParameters

      public Map<String,Object> toEntityParameters()