Package io.tarantool.driver.cluster
Class BinaryClusterDiscoveryEndpoint.Builder
- java.lang.Object
-
- io.tarantool.driver.cluster.BinaryClusterDiscoveryEndpoint.Builder
-
- Enclosing class:
- BinaryClusterDiscoveryEndpoint
public static class BinaryClusterDiscoveryEndpoint.Builder extends Object
Builder forBinaryClusterDiscoveryEndpoint
-
-
Constructor Summary
Constructors Constructor Description Builder()
Basic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryClusterDiscoveryEndpoint
build()
Build the discovery endpoint configurationBinaryClusterDiscoveryEndpoint.Builder
withClientConfig(TarantoolClientConfig clientConfig)
Specify the client configuration for connecting to the discovery endpoints.BinaryClusterDiscoveryEndpoint.Builder
withEndpointProvider(TarantoolClusterAddressProvider endpointProvider)
Specify address provider for the discovery endpointsBinaryClusterDiscoveryEndpoint.Builder
withEntryFunction(String discoveryFunction)
Specify the function name to invoke in the discovery endpoint for getting the list of nodes.
-
-
-
Method Detail
-
withEntryFunction
public BinaryClusterDiscoveryEndpoint.Builder withEntryFunction(String discoveryFunction)
Specify the function name to invoke in the discovery endpoint for getting the list of nodes. The function should not require any parameters and must be exposed as API function. Also the user which is connecting the endpoint must have the appropriate permission for this function.- Parameters:
discoveryFunction
- the function name, should not be null- Returns:
- this builder instance
-
withEndpointProvider
public BinaryClusterDiscoveryEndpoint.Builder withEndpointProvider(TarantoolClusterAddressProvider endpointProvider)
Specify address provider for the discovery endpoints- Parameters:
endpointProvider
- discovery endpoint address privider, should not be null- Returns:
- this builder instance
- See Also:
BinaryClusterDiscoveryEndpoint.setEndpointProvider(TarantoolClusterAddressProvider)
-
withClientConfig
public BinaryClusterDiscoveryEndpoint.Builder withClientConfig(TarantoolClientConfig clientConfig)
Specify the client configuration for connecting to the discovery endpoints. The same configuration will be used for all endpoints- Parameters:
clientConfig
- tarantool client configuration- Returns:
- this builder instance
-
build
public BinaryClusterDiscoveryEndpoint build()
Build the discovery endpoint configuration- Returns:
BinaryClusterDiscoveryEndpoint
instance
-
-