com.hazelcast.core
Interface Member

All Superinterfaces:
DataSerializable, Endpoint
All Known Implementing Classes:
MemberImpl

public interface Member
extends DataSerializable, Endpoint

Cluster member interface. The default implementation MemberImpl violates the Java Serialization contract. It should be serialized/deserialized by Hazelcast.

See Also:
Cluster, MembershipListener

Method Summary
 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.
 Float getFloatAttribute(String key)
          Returns the value of the specified key for this member or null if value is undefined.
 InetSocketAddress getInetSocketAddress()
          Deprecated. use getSocketAddress() instead
 Integer getIntAttribute(String key)
          Returns the value of the specified key for this member or null if value is undefined.
 Long getLongAttribute(String key)
          Returns the value of the specified key for this member or null if value is undefined.
 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.
 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 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 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.
 
Methods inherited from interface com.hazelcast.nio.serialization.DataSerializable
readData, writeData
 

Method Detail

localMember

boolean localMember()
Returns true if this member is the local member.

Returns:
true if this member is the local member, false otherwise.

getInetSocketAddress

@Deprecated
InetSocketAddress getInetSocketAddress()
Deprecated. use getSocketAddress() instead

Returns the InetSocketAddress of this member.

Returns:
InetSocketAddress of this member

getSocketAddress

InetSocketAddress getSocketAddress()
Returns the socket address of this member.

Specified by:
getSocketAddress in interface Endpoint
Returns:
the socket address of this member

getUuid

String getUuid()
Returns the UUID of this member.

Specified by:
getUuid in interface Endpoint
Returns:
the UUID of this member.

getAttributes

Map<String,Object> getAttributes()
Returns configured attributes for this member.
This method might not be available on all native clients.

Returns:
configured attributes for this member.
Since:
3.2

getStringAttribute

String getStringAttribute(String key)
Returns the value of the specified key for this member or null if value is undefined.

Parameters:
key - The key to lookup.
Returns:
The value for this member key.
Since:
3.2

setStringAttribute

void setStringAttribute(String key,
                        String value)
Defines a key-value pair string attribute for this member available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

getBooleanAttribute

Boolean getBooleanAttribute(String key)
Returns the value of the specified key for this member, or null if the value is undefined.

Parameters:
key - The key to look up
Returns:
the value for this member key
Since:
3.2

setBooleanAttribute

void setBooleanAttribute(String key,
                         boolean value)
Defines a key-value pair boolean attribute for this member that is available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

getByteAttribute

Byte getByteAttribute(String key)
Returns the value of the specified key for this member or null if the value is undefined.

Parameters:
key - The key to look up.
Returns:
The value for this member key.
Since:
3.2

setByteAttribute

void setByteAttribute(String key,
                      byte value)
Defines a key-value pair byte attribute for this member available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

getShortAttribute

Short getShortAttribute(String key)
Returns the value of the specified key for this member or null if value is undefined.

Parameters:
key - The key to look up.
Returns:
The value for this member key.
Since:
3.2

setShortAttribute

void setShortAttribute(String key,
                       short value)
Defines a key-value pair short attribute for this member available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

getIntAttribute

Integer getIntAttribute(String key)
Returns the value of the specified key for this member or null if value is undefined.

Parameters:
key - The key to look up.
Returns:
The value for this members key.
Since:
3.2

setIntAttribute

void setIntAttribute(String key,
                     int value)
Defines a key-value pair int attribute for this member available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

getLongAttribute

Long getLongAttribute(String key)
Returns the value of the specified key for this member or null if value is undefined.

Parameters:
key - The key to look up.
Returns:
The value for this members key.
Since:
3.2

setLongAttribute

void setLongAttribute(String key,
                      long value)
Defines a key-value pair long attribute for this member available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

getFloatAttribute

Float getFloatAttribute(String key)
Returns the value of the specified key for this member or null if value is undefined.

Parameters:
key - The key to look up.
Returns:
The value for this member key.
Since:
3.2

setFloatAttribute

void setFloatAttribute(String key,
                       float value)
Defines a key-value pair float attribute for this member available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

getDoubleAttribute

Double getDoubleAttribute(String key)
Returns the value of the specified key for this member or null if value is undefined.

Parameters:
key - The key to look up.
Returns:
The value for this members key.
Since:
3.2

setDoubleAttribute

void setDoubleAttribute(String key,
                        double value)
Defines a key-value pair double attribute for this member available to other cluster members.

Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.
Since:
3.2

removeAttribute

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.

Parameters:
key - The key to be deleted from the member attributes
Since:
3.2


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.