public final class MemberImpl extends Object implements Member, HazelcastInstanceAware, IdentifiedDataSerializable
| Constructor and Description |
|---|
MemberImpl() |
MemberImpl(Address address,
boolean localMember) |
MemberImpl(Address address,
boolean localMember,
String uuid,
HazelcastInstanceImpl instance) |
MemberImpl(Address address,
boolean localMember,
String uuid,
HazelcastInstanceImpl instance,
Map<String,Object> attributes) |
MemberImpl(MemberImpl member) |
| Modifier and Type | Method and Description |
|---|---|
void |
didPing() |
void |
didRead() |
void |
didWrite() |
boolean |
equals(Object obj) |
Address |
getAddress() |
Map<String,Object> |
getAttributes()
Returns configured attributes for this member.
This method might not be available on all native clients. |
Boolean |
getBooleanAttribute(String key)
Returns the value of the specified key for this member, or
null if the value is undefined.
|
Byte |
getByteAttribute(String key)
Returns the value of the specified key for this member or
null if the value is undefined.
|
Double |
getDoubleAttribute(String key)
Returns the value of the specified key for this member or
null if value is undefined.
|
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
Float |
getFloatAttribute(String key)
Returns the value of the specified key for this member or
null if value is undefined.
|
int |
getId()
Returns type identifier for this class.
|
InetAddress |
getInetAddress() |
InetSocketAddress |
getInetSocketAddress()
Returns the InetSocketAddress of this member.
|
Integer |
getIntAttribute(String key)
Returns the value of the specified key for this member or
null if value is undefined.
|
long |
getLastPing() |
long |
getLastRead() |
long |
getLastWrite() |
Long |
getLongAttribute(String key)
Returns the value of the specified key for this member or
null if value is undefined.
|
int |
getPort() |
Short |
getShortAttribute(String key)
Returns the value of the specified key for this member or
null if value is undefined.
|
InetSocketAddress |
getSocketAddress()
Returns the socket address of this member.
|
String |
getStringAttribute(String key)
Returns the value of the specified key for this member or
null if value is undefined.
|
String |
getUuid()
Returns the UUID of this member.
|
int |
hashCode() |
boolean |
localMember()
Returns true if this member is the local member.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
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 |
setBooleanAttribute(String key,
boolean value)
Defines a key-value pair boolean attribute for this member that is available
to other cluster members.
|
void |
setByteAttribute(String key,
byte value)
Defines a key-value pair byte attribute for this member available
to other cluster members.
|
void |
setDoubleAttribute(String key,
double value)
Defines a key-value pair double attribute for this member available
to other cluster members.
|
void |
setFloatAttribute(String key,
float value)
Defines a key-value pair float attribute for this member available
to other cluster members.
|
void |
setHazelcastInstance(HazelcastInstance hazelcastInstance)
Gets the HazelcastInstance reference when submitting a Runnable/Callable using Hazelcast ExecutorService.
|
void |
setIntAttribute(String key,
int value)
Defines a key-value pair int attribute for this member available
to other cluster members.
|
void |
setLongAttribute(String key,
long value)
Defines a key-value pair long attribute for this member available
to other cluster members.
|
void |
setShortAttribute(String key,
short value)
Defines a key-value pair short attribute for this member available
to other cluster members.
|
void |
setStringAttribute(String key,
String value)
Defines a key-value pair string attribute for this member available
to other cluster members.
|
String |
toString() |
void |
updateAttribute(MemberAttributeOperationType operationType,
String key,
Object value) |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public MemberImpl()
public MemberImpl(Address address, boolean localMember)
public MemberImpl(Address address, boolean localMember, String uuid, HazelcastInstanceImpl instance)
public MemberImpl(Address address, boolean localMember, String uuid, HazelcastInstanceImpl instance, Map<String,Object> attributes)
public MemberImpl(MemberImpl member)
public Address getAddress()
public int getPort()
public InetAddress getInetAddress()
public InetSocketAddress getInetSocketAddress()
MembergetInetSocketAddress in interface Memberpublic InetSocketAddress getSocketAddress()
MembergetSocketAddress in interface EndpointgetSocketAddress in interface Memberpublic void setHazelcastInstance(HazelcastInstance hazelcastInstance)
HazelcastInstanceAwaresetHazelcastInstance in interface HazelcastInstanceAwarehazelcastInstance - the HazelcastInstance referencepublic boolean localMember()
MemberlocalMember in interface Memberpublic void didWrite()
public void didRead()
public void didPing()
public long getLastPing()
public long getLastRead()
public long getLastWrite()
public String getUuid()
Memberpublic Map<String,Object> getAttributes()
MembergetAttributes in interface Memberpublic void updateAttribute(MemberAttributeOperationType operationType, String key, Object value)
public String getStringAttribute(String key)
MembergetStringAttribute in interface Memberkey - The key to lookup.public void setStringAttribute(String key, String value)
MembersetStringAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public Boolean getBooleanAttribute(String key)
MembergetBooleanAttribute in interface Memberkey - The key to look uppublic void setBooleanAttribute(String key, boolean value)
MembersetBooleanAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public Byte getByteAttribute(String key)
MembergetByteAttribute in interface Memberkey - The key to look up.public void setByteAttribute(String key, byte value)
MembersetByteAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public Short getShortAttribute(String key)
MembergetShortAttribute in interface Memberkey - The key to look up.public void setShortAttribute(String key, short value)
MembersetShortAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public Integer getIntAttribute(String key)
MembergetIntAttribute in interface Memberkey - The key to look up.public void setIntAttribute(String key, int value)
MembersetIntAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public Long getLongAttribute(String key)
MembergetLongAttribute in interface Memberkey - The key to look up.public void setLongAttribute(String key, long value)
MembersetLongAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public Float getFloatAttribute(String key)
MembergetFloatAttribute in interface Memberkey - The key to look up.public void setFloatAttribute(String key, float value)
MembersetFloatAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public Double getDoubleAttribute(String key)
MembergetDoubleAttribute in interface Memberkey - The key to look up.public void setDoubleAttribute(String key, double value)
MembersetDoubleAttribute in interface Memberkey - The key for this property.value - The value that corresponds to this attribute and this member.public void removeAttribute(String key)
MemberremoveAttribute in interface Memberkey - The key to be deleted from the member attributespublic void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOExceptionpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOExceptionpublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializableCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.