Class ConsistentHash.ConsistentHashMember

java.lang.Object
org.axonframework.commandhandling.distributed.ConsistentHash.ConsistentHashMember
All Implemented Interfaces:
Member
Enclosing class:
ConsistentHash

public static class ConsistentHash.ConsistentHashMember extends Object implements Member
Member implementation used by a ConsistentHash registry.
  • Method Details

    • name

      public String name()
      Description copied from interface: Member
      Returns the name of this Member.
      Specified by:
      name in interface Member
      Returns:
      the member name
    • local

      public boolean local()
      Specified by:
      local in interface Member
      Returns:
      True if the member is local. False if the member is remote or if this information is unknown.
    • suspect

      public void suspect()
      Description copied from interface: Member
      Mark this member as suspect, i.e. suspected of being (temporarily) unavailable.
      Specified by:
      suspect in interface Member
    • segmentCount

      public int segmentCount()
      Returns this member's segment count which relates to the relative load factor of the member.
      Returns:
      the member's segment count
    • getCommandFilter

      public CommandMessageFilter getCommandFilter()
      Returns this member's filter describing the commands it supports
      Returns:
      the filter that describes this member's supported commands
    • hashes

      public Set<String> hashes()
      Returns the hashes covered by the member. If the hash of the routing key matches with one of the returned hashes and the member is capable of handling the command then it will be selected as a target for the command.
      Returns:
      the hashes covered by this member
    • getConnectionEndpoint

      public <T> Optional<T> getConnectionEndpoint(Class<T> protocol)
      Description copied from interface: Member
      Get the endpoint of this Member given a protocol. Returns an empty optional if the protocol is not a supported endpoint of this member.
      Specified by:
      getConnectionEndpoint in interface Member
      Type Parameters:
      T - the protocol type
      Parameters:
      protocol - the expected
      Returns:
      the endpoint if this member supports the protocol. An empty optional otherwise.
    • 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