public final class SimpleDiscoveryNode extends DiscoveryNode
DiscoveryNode
interface for convenience
when implementing a DiscoveryStrategy
.Constructor and Description |
---|
SimpleDiscoveryNode(Address privateAddress)
This constructor will set private and public addresses to the same value and no properties
are available.
|
SimpleDiscoveryNode(Address privateAddress,
Address publicAddress)
This constructor will set private and public addresses separately and no properties are available.
|
SimpleDiscoveryNode(Address privateAddress,
Address publicAddress,
Map<String,String> properties)
This constructor will set private and public addresses separately.
|
SimpleDiscoveryNode(Address privateAddress,
Map<String,String> properties)
This constructor will set private and public addresses to the same value.
|
Modifier and Type | Method and Description |
---|---|
Address |
getPrivateAddress()
Returns the private address of the discovered node.
|
Map<String,Object> |
getProperties()
Returns a set of unmodifiable properties that are assigned to the discovered node.
|
Address |
getPublicAddress()
Returns the public address of the discovered node if available.
|
public SimpleDiscoveryNode(Address privateAddress)
privateAddress
- the discovered node's private addresspublic SimpleDiscoveryNode(Address privateAddress, Map<String,String> properties)
privateAddress
- the discovered node's private addressproperties
- the discovered node's additional propertiespublic SimpleDiscoveryNode(Address privateAddress, Address publicAddress)
This constructor will set private and public addresses separately and no properties are available. Based on the internal implementation Hazelcast will either choose private or public address to connect to the cluster.
On members private addresses are preferred.
privateAddress
- the discovered node's private addresspublicAddress
- the discovered node's public addresspublic SimpleDiscoveryNode(Address privateAddress, Address publicAddress, Map<String,String> properties)
This constructor will set private and public addresses separately. Based on the internal implementation Hazelcast will either choose private or public address to connect to the cluster.
On members private addresses are preferred.
privateAddress
- the discovered node's private addresspublicAddress
- the discovered node's public addressproperties
- the discovered node's additional propertiespublic Address getPrivateAddress()
DiscoveryNode
getPrivateAddress
in class DiscoveryNode
public Address getPublicAddress()
DiscoveryNode
DiscoveryNode.getPrivateAddress()
.getPublicAddress
in class DiscoveryNode
DiscoveryNode.getPrivateAddress()
public Map<String,Object> getProperties()
DiscoveryNode
NodeFilter
API.getProperties
in class DiscoveryNode
Copyright © 2024 Hazelcast, Inc.. All rights reserved.