Package io.scalecube.cluster
Class Member
java.lang.Object
io.scalecube.cluster.Member
- All Implemented Interfaces:
Externalizable,Serializable
Cluster member which represents node in the cluster and contains its id and address. This class
is essentially immutable.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns cluster member address, an address on which this cluster member listens connections from other cluster members.alias()Returns cluster member alias if exists, otherwisenull.booleaninthashCode()id()Returns cluster member local id.Returns cluster member namespace.voidtoString()void
-
Constructor Details
-
Member
public Member() -
Member
Constructor.- Parameters:
id- member id; not nullalias- member alias (optional)address- member address; not nullnamespace- namespace; not null
-
-
Method Details
-
id
Returns cluster member local id.- Returns:
- member id
-
alias
Returns cluster member alias if exists, otherwisenull.- Returns:
- alias if exists or
null - See Also:
-
namespace
Returns cluster member namespace.- Returns:
- namespace
- See Also:
-
address
Returns cluster member address, an address on which this cluster member listens connections from other cluster members.- Returns:
- member address
- See Also:
-
equals
-
hashCode
public int hashCode() -
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
toString
-