public final class MemberImpl extends AbstractMember implements Member
Caution: This class is required by protocol encoder/decoder which are on the Hazelcast module. So this implementation also stays in the same module, although it is totally client side specific.
This class is marked as serializable by convention as it implements interfaceMember
which
is DataSerializable
and not IdentifiedDataSerializable
. Actual serialization
in client protocol communication is performed by a dedicated MemberCodec
.address, addressMap, attributes, liteMember, uuid, version
Constructor and Description |
---|
MemberImpl() |
MemberImpl(AbstractMember member) |
MemberImpl(Address address,
MemberVersion version) |
MemberImpl(Address address,
MemberVersion version,
UUID uuid) |
MemberImpl(Address address,
MemberVersion version,
UUID uuid,
Map<String,String> attributes,
boolean liteMember) |
MemberImpl(Address address,
UUID uuid,
Map<String,String> attributes,
boolean liteMember) |
Modifier and Type | Method and Description |
---|---|
protected ILogger |
getLogger() |
boolean |
localMember()
Returns true if this member is the local member.
|
void |
removeAttribute(String key)
Removes a key-value pair attribute for this member if given key was
previously assigned as an attribute.
If key wasn't assigned to a value this method does nothing. |
void |
setAttribute(String key,
String value)
Defines a key-value pair string attribute for this member available
to other cluster members.
|
equals, getAddress, getAddressMap, getAttribute, getAttributes, getInetAddress, getPort, getSocketAddress, getSocketAddress, getUuid, getVersion, hashCode, isLiteMember, readData, toString, updateAttribute, writeData
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAddress, getAddressMap, getAttribute, getAttributes, getSocketAddress, getSocketAddress, getUuid, getVersion, isLiteMember
readData, writeData
public MemberImpl()
public MemberImpl(Address address, MemberVersion version)
public MemberImpl(Address address, MemberVersion version, UUID uuid)
public MemberImpl(Address address, UUID uuid, Map<String,String> attributes, boolean liteMember)
public MemberImpl(Address address, MemberVersion version, UUID uuid, Map<String,String> attributes, boolean liteMember)
public MemberImpl(AbstractMember member)
protected ILogger getLogger()
getLogger
in class AbstractMember
public boolean localMember()
Member
localMember
in interface Member
true
if this member is the local member, false
otherwise.public void setAttribute(String key, String value)
Member
setAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public void removeAttribute(String key)
Member
removeAttribute
in interface Member
key
- The key to be deleted from the member attributesCopyright © 2019 Hazelcast, Inc.. All rights reserved.