Class ConsistentHash.ConsistentHashMember
java.lang.Object
org.axonframework.commandhandling.distributed.ConsistentHash.ConsistentHashMember
- All Implemented Interfaces:
Member
- Enclosing class:
ConsistentHash
Member implementation used by a
ConsistentHash registry.-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns this member's filter describing the commands it supports<T> Optional<T> getConnectionEndpoint(Class<T> protocol) Get the endpoint of this Member given aprotocol.inthashCode()hashes()Returns the hashes covered by the member.booleanlocal()name()Returns the name of this Member.intReturns this member's segment count which relates to the relative load factor of the member.voidsuspect()Mark this member as suspect, i.e. suspected of being (temporarily) unavailable.toString()
-
Method Details
-
name
Description copied from interface:MemberReturns the name of this Member. -
local
public boolean local() -
suspect
public void suspect()Description copied from interface:MemberMark this member as suspect, i.e. suspected of being (temporarily) unavailable. -
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
Returns this member's filter describing the commands it supports- Returns:
- the filter that describes this member's supported commands
-
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
Description copied from interface:MemberGet the endpoint of this Member given aprotocol. Returns an empty optional if the protocol is not a supported endpoint of this member.- Specified by:
getConnectionEndpointin interfaceMember- Type Parameters:
T- the protocol type- Parameters:
protocol- the expected- Returns:
- the endpoint if this member supports the protocol. An empty optional otherwise.
-
equals
-
hashCode
public int hashCode() -
toString
-