|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.instance.MemberImpl
public final class MemberImpl
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
public Address getAddress()
public int getPort()
public InetAddress getInetAddress()
public InetSocketAddress getInetSocketAddress()
Member
getInetSocketAddress
in interface Member
public InetSocketAddress getSocketAddress()
Member
getSocketAddress
in interface Endpoint
getSocketAddress
in interface Member
public void setHazelcastInstance(HazelcastInstance hazelcastInstance)
HazelcastInstanceAware
setHazelcastInstance
in interface HazelcastInstanceAware
hazelcastInstance
- the HazelcastInstance referencepublic boolean localMember()
Member
localMember
in interface Member
public void didWrite()
public void didRead()
public void didPing()
public long getLastPing()
public long getLastRead()
public long getLastWrite()
public String getUuid()
Member
getUuid
in interface Endpoint
getUuid
in interface Member
public Map<String,Object> getAttributes()
Member
getAttributes
in interface Member
public void updateAttribute(MemberAttributeOperationType operationType, String key, Object value)
public String getStringAttribute(String key)
Member
getStringAttribute
in interface Member
key
- The key to lookup.
public void setStringAttribute(String key, String value)
Member
setStringAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public Boolean getBooleanAttribute(String key)
Member
getBooleanAttribute
in interface Member
key
- The key to look up
public void setBooleanAttribute(String key, boolean value)
Member
setBooleanAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public Byte getByteAttribute(String key)
Member
getByteAttribute
in interface Member
key
- The key to look up.
public void setByteAttribute(String key, byte value)
Member
setByteAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public Short getShortAttribute(String key)
Member
getShortAttribute
in interface Member
key
- The key to look up.
public void setShortAttribute(String key, short value)
Member
setShortAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public Integer getIntAttribute(String key)
Member
getIntAttribute
in interface Member
key
- The key to look up.
public void setIntAttribute(String key, int value)
Member
setIntAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public Long getLongAttribute(String key)
Member
getLongAttribute
in interface Member
key
- The key to look up.
public void setLongAttribute(String key, long value)
Member
setLongAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public Float getFloatAttribute(String key)
Member
getFloatAttribute
in interface Member
key
- The key to look up.
public void setFloatAttribute(String key, float value)
Member
setFloatAttribute
in interface Member
key
- The key for this property.value
- The value that corresponds to this attribute and this member.public Double getDoubleAttribute(String key)
Member
getDoubleAttribute
in interface Member
key
- The key to look up.
public void setDoubleAttribute(String key, double value)
Member
setDoubleAttribute
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 attributespublic void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- input
IOException
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- output
IOException
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |