com.hazelcast.client.impl
Class MemberImpl

java.lang.Object
  extended by com.hazelcast.instance.AbstractMember
      extended by com.hazelcast.client.impl.MemberImpl
All Implemented Interfaces:
Endpoint, Member, DataSerializable

public final class MemberImpl
extends AbstractMember
implements Member

Client side specific Member implementation.

Caution: This class is required by protocol encoder/decoder which are on hazelcast module so this impl also stays in the same module, although it is totally client side specific


Field Summary
 
Fields inherited from class com.hazelcast.instance.AbstractMember
address, attributes, uuid
 
Constructor Summary
MemberImpl()
           
MemberImpl(AbstractMember member)
           
MemberImpl(Address address)
           
MemberImpl(Address address, String uuid)
           
MemberImpl(Address address, String uuid, Map<String,Object> attributes)
           
 
Method Summary
 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.
 Integer getIntAttribute(String key)
          Returns the value of the specified key for this member or null if value is undefined.
protected  ILogger getLogger()
           
 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.
 String getStringAttribute(String key)
          Returns the value of the specified key for this member or null if value is undefined.
 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 class com.hazelcast.instance.AbstractMember
equals, getAddress, getAttribute, getAttributes, getInetAddress, getInetSocketAddress, getPort, getSocketAddress, getUuid, hashCode, readData, toString, updateAttribute, writeData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hazelcast.core.Member
getAttributes, getInetSocketAddress, getSocketAddress, getUuid
 
Methods inherited from interface com.hazelcast.nio.serialization.DataSerializable
readData, writeData
 

Constructor Detail

MemberImpl

public MemberImpl()

MemberImpl

public MemberImpl(Address address)

MemberImpl

public MemberImpl(Address address,
                  String uuid)

MemberImpl

public MemberImpl(Address address,
                  String uuid,
                  Map<String,Object> attributes)

MemberImpl

public MemberImpl(AbstractMember member)
Method Detail

getLogger

protected ILogger getLogger()
Specified by:
getLogger in class AbstractMember

localMember

public boolean localMember()
Description copied from interface: Member
Returns true if this member is the local member.

Specified by:
localMember in interface Member
Returns:
true if this member is the local member, false otherwise.

getStringAttribute

public String getStringAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member or null if value is undefined.

Specified by:
getStringAttribute in interface Member
Parameters:
key - The key to lookup.
Returns:
The value for this member key.

setStringAttribute

public void setStringAttribute(String key,
                               String value)
Description copied from interface: Member
Defines a key-value pair string attribute for this member available to other cluster members.

Specified by:
setStringAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

getBooleanAttribute

public Boolean getBooleanAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member, or null if the value is undefined.

Specified by:
getBooleanAttribute in interface Member
Parameters:
key - The key to look up
Returns:
the value for this member key

setBooleanAttribute

public void setBooleanAttribute(String key,
                                boolean value)
Description copied from interface: Member
Defines a key-value pair boolean attribute for this member that is available to other cluster members.

Specified by:
setBooleanAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

getByteAttribute

public Byte getByteAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member or null if the value is undefined.

Specified by:
getByteAttribute in interface Member
Parameters:
key - The key to look up.
Returns:
The value for this member key.

setByteAttribute

public void setByteAttribute(String key,
                             byte value)
Description copied from interface: Member
Defines a key-value pair byte attribute for this member available to other cluster members.

Specified by:
setByteAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

getShortAttribute

public Short getShortAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member or null if value is undefined.

Specified by:
getShortAttribute in interface Member
Parameters:
key - The key to look up.
Returns:
The value for this member key.

setShortAttribute

public void setShortAttribute(String key,
                              short value)
Description copied from interface: Member
Defines a key-value pair short attribute for this member available to other cluster members.

Specified by:
setShortAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

getIntAttribute

public Integer getIntAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member or null if value is undefined.

Specified by:
getIntAttribute in interface Member
Parameters:
key - The key to look up.
Returns:
The value for this members key.

setIntAttribute

public void setIntAttribute(String key,
                            int value)
Description copied from interface: Member
Defines a key-value pair int attribute for this member available to other cluster members.

Specified by:
setIntAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

getLongAttribute

public Long getLongAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member or null if value is undefined.

Specified by:
getLongAttribute in interface Member
Parameters:
key - The key to look up.
Returns:
The value for this members key.

setLongAttribute

public void setLongAttribute(String key,
                             long value)
Description copied from interface: Member
Defines a key-value pair long attribute for this member available to other cluster members.

Specified by:
setLongAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

getFloatAttribute

public Float getFloatAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member or null if value is undefined.

Specified by:
getFloatAttribute in interface Member
Parameters:
key - The key to look up.
Returns:
The value for this member key.

setFloatAttribute

public void setFloatAttribute(String key,
                              float value)
Description copied from interface: Member
Defines a key-value pair float attribute for this member available to other cluster members.

Specified by:
setFloatAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

getDoubleAttribute

public Double getDoubleAttribute(String key)
Description copied from interface: Member
Returns the value of the specified key for this member or null if value is undefined.

Specified by:
getDoubleAttribute in interface Member
Parameters:
key - The key to look up.
Returns:
The value for this members key.

setDoubleAttribute

public void setDoubleAttribute(String key,
                               double value)
Description copied from interface: Member
Defines a key-value pair double attribute for this member available to other cluster members.

Specified by:
setDoubleAttribute in interface Member
Parameters:
key - The key for this property.
value - The value that corresponds to this attribute and this member.

removeAttribute

public void removeAttribute(String key)
Description copied from interface: Member
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.

Specified by:
removeAttribute in interface Member
Parameters:
key - The key to be deleted from the member attributes


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