Package org.apache.ignite.client
Interface ClientAddressFinder
-
- All Known Implementing Classes:
ThinClientKubernetesAddressFinder
public interface ClientAddressFinder
This interface provides a list of addresses of Ignite server nodes within a cluster. Thin client uses the list to route user requests. There are cases when the list is not static, for example in cloud environment. In such cases addresses of nodes and/or number of server nodes can change. Implementation of this interface should handle these. Ignite waits for a topology change to triggergetAddresses()
. There are two modes of how soon Ignite calls it, lazy and eager, depending on whether the partition awareness feature is enabled. If the feature is enabled then Ignite calls the method for every topology change. Otherwise Ignite uses previous addresses until a first failure.ClientConfiguration.setPartitionAwarenessEnabled(boolean)
ClientConfiguration.setAddressesFinder(ClientAddressFinder)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getAddresses()
Get addresses of Ignite server nodes within a cluster.
-
-
-
Method Detail
-
getAddresses
String[] getAddresses()
Get addresses of Ignite server nodes within a cluster. An address can be IPv4 address or hostname, with or without port. If port is not set then Ignite will generate multiple addresses for default port range. SeeClientConnectorConfiguration.DFLT_PORT
,ClientConnectorConfiguration.DFLT_PORT_RANGE
.- Returns:
- Addresses of Ignite server nodes within a cluster.
-
-