public abstract class AbstractMember extends Object implements Member
Modifier and Type | Field and Description |
---|---|
protected Address |
address |
protected Map<EndpointQualifier,Address> |
addressMap |
protected Map<String,String> |
attributes |
protected boolean |
liteMember |
protected UUID |
uuid |
protected MemberVersion |
version |
Modifier | Constructor and Description |
---|---|
protected |
AbstractMember() |
protected |
AbstractMember(AbstractMember member) |
protected |
AbstractMember(Map<EndpointQualifier,Address> addresses,
MemberVersion version,
UUID uuid,
Map<String,String> attributes,
boolean liteMember) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Address |
getAddress()
Returns the Address of this Member.
|
Map<EndpointQualifier,Address> |
getAddressMap() |
String |
getAttribute(String key)
Returns the value of the specified key for this member or
null if value is undefined.
|
Map<String,String> |
getAttributes()
Returns configured attributes for this member.
This method might not be available on all native clients. |
InetAddress |
getInetAddress() |
protected abstract ILogger |
getLogger() |
int |
getPort() |
InetSocketAddress |
getSocketAddress()
Returns the socket address of this member for member to member communications or unified depending on config.
|
InetSocketAddress |
getSocketAddress(EndpointQualifier qualifier)
Returns the socket address of this member.
|
UUID |
getUuid()
Returns the UUID of this member.
|
MemberVersion |
getVersion()
Returns the Hazelcast codebase version of this member; this may or may not be different from the version reported by
Cluster.getClusterVersion() , for example when a node with a different codebase version is added to an
existing cluster. |
int |
hashCode() |
boolean |
isLiteMember()
Returns true if this member is a lite member.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
updateAttribute(MemberAttributeOperationType operationType,
String key,
String value) |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
localMember, removeAttribute, setAttribute
protected Address address
protected Map<EndpointQualifier,Address> addressMap
protected UUID uuid
protected boolean liteMember
protected MemberVersion version
protected AbstractMember()
protected AbstractMember(Map<EndpointQualifier,Address> addresses, MemberVersion version, UUID uuid, Map<String,String> attributes, boolean liteMember)
protected AbstractMember(AbstractMember member)
public Address getAddress()
Member
getAddress
in interface Member
public Map<EndpointQualifier,Address> getAddressMap()
getAddressMap
in interface Member
Address
es per EndpointQualifier
of this memberpublic int getPort()
public InetAddress getInetAddress()
protected abstract ILogger getLogger()
public InetSocketAddress getSocketAddress()
Member
getSocketAddress(ProtocolType.MEMBER)
.getSocketAddress
in interface Endpoint
getSocketAddress
in interface Member
public InetSocketAddress getSocketAddress(EndpointQualifier qualifier)
Member
getSocketAddress
in interface Member
public UUID getUuid()
Member
public boolean isLiteMember()
Member
isLiteMember
in interface Member
true
if this member is a lite member, false
otherwise.
Lite members do not own any partition.public Map<String,String> getAttributes()
Member
getAttributes
in interface Member
public void updateAttribute(MemberAttributeOperationType operationType, String key, String value)
public String getAttribute(String key)
Member
getAttribute
in interface Member
key
- The key to lookup.public MemberVersion getVersion()
Member
Cluster.getClusterVersion()
, for example when a node with a different codebase version is added to an
existing cluster. See the documentation for Cluster.getClusterVersion()
for a more thorough discussion
of Cluster
and Member
/ Node
version.getVersion
in interface Member
MemberVersion
of this member.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.Copyright © 2019 Hazelcast, Inc.. All rights reserved.