Constructor and Description |
---|
SimpleMember(String name,
E endpoint,
boolean local,
Consumer<SimpleMember<E>> suspectHandler)
Create the service member
|
Modifier and Type | Method and Description |
---|---|
E |
endpoint()
Returns this Member's endpoint.
|
boolean |
equals(Object o) |
<T> Optional<T> |
getConnectionEndpoint(Class<T> protocol)
Get the endpoint of this Member given a
protocol . |
int |
hashCode() |
boolean |
local() |
String |
name()
Returns the name of this Member.
|
void |
suspect()
Mark this member as suspect, i.e.
|
String |
toString() |
public SimpleMember(String name, E endpoint, boolean local, Consumer<SimpleMember<E>> suspectHandler)
name
- the member nameendpoint
- The object describing the endpointlocal
- True if the member is local. False if the member is remote or if this information is unknown.suspectHandler
- The operation to execute when this member is marked as a suspectpublic String name()
Member
public <T> Optional<T> getConnectionEndpoint(Class<T> protocol)
Member
protocol
. Returns an empty optional if the protocol is not a
supported endpoint of this member.getConnectionEndpoint
in interface Member
T
- the protocol typeprotocol
- the expectedpublic void suspect()
Member
public E endpoint()
public boolean local()
Copyright © 2010–2017. All rights reserved.