Class ClientConfig
- java.lang.Object
-
- com.hazelcast.client.config.ClientConfig
-
- Direct Known Subclasses:
ClientClasspathXmlConfig
,ClientClasspathYamlConfig
public class ClientConfig extends java.lang.Object
Main configuration to setup a Hazelcast Client
-
-
Constructor Summary
Constructors Constructor Description ClientConfig()
ClientConfig(ClientConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientConfig
addFlakeIdGeneratorConfig(ClientFlakeIdGeneratorConfig config)
Adds a flake ID generator configuration.ClientConfig
addLabel(java.lang.String label)
Adds a label for this clientClient
availableClientConfig
addListenerConfig(ListenerConfig listenerConfig)
Helper method to add a new ListenerConfigClientConfig
addNearCacheConfig(NearCacheConfig nearCacheConfig)
Helper method to add a new NearCacheConfigClientConfig
addProxyFactoryConfig(ProxyFactoryConfig proxyFactoryConfig)
Helper method to add a newProxyFactoryConfig
ClientConfig
addQueryCacheConfig(java.lang.String mapName, QueryCacheConfig queryCacheConfig)
ClientConfig
addReliableTopicConfig(ClientReliableTopicConfig reliableTopicConfig)
Adds a ClientReliableTopicConfig.boolean
equals(java.lang.Object obj)
ClientFlakeIdGeneratorConfig
findFlakeIdGeneratorConfig(java.lang.String name)
Returns aClientFlakeIdGeneratorConfig
configuration for the given flake ID generator name.java.lang.ClassLoader
getClassLoader()
Gets the classLoaderjava.lang.String
getClusterName()
Returns the configured cluster name.ConfigPatternMatcher
getConfigPatternMatcher()
Returns the pattern matcher which is used to match item names to configuration objects.ClientConnectionStrategyConfig
getConnectionStrategyConfig()
ClientFlakeIdGeneratorConfig
getFlakeIdGeneratorConfig(java.lang.String name)
Returns theClientFlakeIdGeneratorConfig
for the given name, creating one if necessary and adding it to the collection of known configurations.java.util.Map<java.lang.String,ClientFlakeIdGeneratorConfig>
getFlakeIdGeneratorConfigMap()
Returns the map ofFlakeIdGenerator
configurations, mapped by config name.java.lang.String
getInstanceName()
InstanceTrackingConfig
getInstanceTrackingConfig()
Returns the configuration for tracking use of this Hazelcast instance.java.util.Set<java.lang.String>
getLabels()
java.util.List<ListenerConfig>
getListenerConfigs()
Gets list of all configuredListenerConfig
'sLoadBalancer
getLoadBalancer()
Gets LoadBalancerjava.lang.String
getLoadBalancerClassName()
Gets load balancer class nameManagedContext
getManagedContext()
GetsManagedContext
ClientMetricsConfig
getMetricsConfig()
Returns the metrics collection config.NativeMemoryConfig
getNativeMemoryConfig()
NearCacheConfig
getNearCacheConfig(java.lang.String name)
Gets theNearCacheConfig
configured for the map / cache with namejava.util.Map<java.lang.String,NearCacheConfig>
getNearCacheConfigMap()
Map of all configured NearCacheConfig's with the name key and configuration as the valueClientNetworkConfig
getNetworkConfig()
GetsClientNetworkConfig
QueryCacheConfig
getOrCreateQueryCacheConfig(java.lang.String mapName, java.lang.String cacheName)
QueryCacheConfig
getOrNullQueryCacheConfig(java.lang.String mapName, java.lang.String cacheName)
java.util.Properties
getProperties()
GetsProperties
objectjava.lang.String
getProperty(java.lang.String name)
Gets a named property already set or from system properties if not exists.java.util.List<ProxyFactoryConfig>
getProxyFactoryConfigs()
Gets list ofProxyFactoryConfig
java.util.Map<java.lang.String,java.util.Map<java.lang.String,QueryCacheConfig>>
getQueryCacheConfigs()
ClientReliableTopicConfig
getReliableTopicConfig(java.lang.String name)
Gets the ClientReliableTopicConfig for a given reliable topic name.java.util.Map<java.lang.String,ClientReliableTopicConfig>
getReliableTopicConfigMap()
Returns the map of reliable topic configurations, mapped by config name.ClientSecurityConfig
getSecurityConfig()
GetsClientSecurityConfig
object which allows client credentials configuration.SerializationConfig
getSerializationConfig()
GetsSerializationConfig
ClientSqlConfig
getSqlConfig()
Returns the configuration for the SQL feature.ClientTpcConfig
getTpcConfig()
Returns the ClientTpcConfigClientUserCodeDeploymentConfig
getUserCodeDeploymentConfig()
Get current configuration of User Code Deployment.java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object>
getUserContext()
int
hashCode()
boolean
isBackupAckToClientEnabled()
Note that backup acks to client can be enabled only for smart client.static ClientConfig
load()
Populates HazelcastClientConfig
object from an external configuration file.ClientConfig
setBackupAckToClientEnabled(boolean backupAckToClientEnabled)
This feature reduces number of hops and increase performance for smart clients.ClientConfig
setClassLoader(java.lang.ClassLoader classLoader)
Sets the classLoader which is used by serialization and listener configurationClientConfig
setClusterName(java.lang.String clusterName)
ClientConfig
setConfigPatternMatcher(ConfigPatternMatcher configPatternMatcher)
Sets the pattern matcher which is used to match item names to configuration objects.ClientConfig
setConnectionStrategyConfig(ClientConnectionStrategyConfig connectionStrategyConfig)
ClientConfig
setCredentials(Credentials credentials)
Shortcut forgetSecurityConfig().setCredentials()
ClientConfig
setFlakeIdGeneratorConfigMap(java.util.Map<java.lang.String,ClientFlakeIdGeneratorConfig> map)
Sets the map ofFlakeIdGenerator
configurations, mapped by config name.ClientConfig
setInstanceName(java.lang.String instanceName)
ClientConfig
setInstanceTrackingConfig(InstanceTrackingConfig instanceTrackingConfig)
Returns the configuration for tracking use of this Hazelcast instance.ClientConfig
setLabels(java.util.Set<java.lang.String> labels)
Set labels for the client.ClientConfig
setListenerConfigs(java.util.List<ListenerConfig> listenerConfigs)
Sets allListenerConfig
'sClientConfig
setLoadBalancer(LoadBalancer loadBalancer)
Sets theLoadBalancer
.ClientConfig
setLoadBalancerClassName(java.lang.String loadBalancerClassName)
Sets load balancer class name.ClientConfig
setManagedContext(ManagedContext managedContext)
SetsManagedContext
ClientConfig
setMetricsConfig(ClientMetricsConfig metricsConfig)
Sets the metrics collection config.ClientConfig
setNativeMemoryConfig(NativeMemoryConfig nativeMemoryConfig)
ClientConfig
setNearCacheConfigMap(java.util.Map<java.lang.String,NearCacheConfig> nearCacheConfigMap)
Sets allNearCacheConfig
's with the provided mapClientConfig
setNetworkConfig(ClientNetworkConfig networkConfig)
SetsClientNetworkConfig
ClientConfig
setProperties(java.util.Properties properties)
sets all propertiesClientConfig
setProperty(java.lang.String name, java.lang.String value)
Sets the value of a named property.ClientConfig
setProxyFactoryConfigs(java.util.List<ProxyFactoryConfig> proxyFactoryConfigs)
Sets theProxyFactoryConfig
ClientConfig
setQueryCacheConfigs(java.util.Map<java.lang.String,java.util.Map<java.lang.String,QueryCacheConfig>> queryCacheConfigs)
ClientConfig
setReliableTopicConfigMap(java.util.Map<java.lang.String,ClientReliableTopicConfig> map)
Sets the map ofClientReliableTopicConfig
, mapped by config name.ClientConfig
setSecurityConfig(ClientSecurityConfig securityConfig)
SetsClientSecurityConfig
objectClientConfig
setSerializationConfig(SerializationConfig serializationConfig)
SetsSerializationConfig
ClientConfig
setSqlConfig(ClientSqlConfig sqlConfig)
Sets the configuration for the SQL feature.ClientConfig
setTpcConfig(ClientTpcConfig tpcConfig)
Sets the TpcConfigClientConfig
setUserCodeDeploymentConfig(ClientUserCodeDeploymentConfig userCodeDeploymentConfig)
Set User Code Deployment configurationClientConfig
setUserContext(java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> userContext)
java.lang.String
toString()
-
-
-
Constructor Detail
-
ClientConfig
public ClientConfig()
-
ClientConfig
public ClientConfig(ClientConfig config)
-
-
Method Detail
-
load
public static ClientConfig load()
Populates HazelcastClientConfig
object from an external configuration file.It tries to load Hazelcast Client configuration from a list of well-known locations, and then applies overrides found in environment variables/system properties When no location contains Hazelcast Client configuration then it returns default.
Note that the same mechanism is used when calling
HazelcastClient.newHazelcastClient()
.- Returns:
- ClientConfig created from a file when exists, otherwise default.
-
setConfigPatternMatcher
public ClientConfig setConfigPatternMatcher(ConfigPatternMatcher configPatternMatcher)
Sets the pattern matcher which is used to match item names to configuration objects. By default theMatchingPointConfigPatternMatcher
is used.- Parameters:
configPatternMatcher
- the pattern matcher- Returns:
- this configuration
- Throws:
java.lang.IllegalArgumentException
- if the pattern matcher isnull
-
getConfigPatternMatcher
public ConfigPatternMatcher getConfigPatternMatcher()
Returns the pattern matcher which is used to match item names to configuration objects. By default theMatchingPointConfigPatternMatcher
is used.- Returns:
- the pattern matcher
-
getProperty
public java.lang.String getProperty(java.lang.String name)
Gets a named property already set or from system properties if not exists.- Parameters:
name
- property name- Returns:
- value of the property
-
setProperty
public ClientConfig setProperty(java.lang.String name, java.lang.String value)
Sets the value of a named property.- Parameters:
name
- property namevalue
- value of the property- Returns:
- configured
ClientConfig
for chaining
-
getProperties
public java.util.Properties getProperties()
GetsProperties
object- Returns:
Properties
object
-
setProperties
public ClientConfig setProperties(java.util.Properties properties)
sets all properties- Parameters:
properties
-Properties
object- Returns:
- configured
ClientConfig
for chaining
-
getSecurityConfig
public ClientSecurityConfig getSecurityConfig()
GetsClientSecurityConfig
object which allows client credentials configuration.- Returns:
ClientSecurityConfig
instance
-
setSecurityConfig
public ClientConfig setSecurityConfig(ClientSecurityConfig securityConfig)
SetsClientSecurityConfig
object- Parameters:
securityConfig
-ClientSecurityConfig
to be set- Returns:
- configured
ClientConfig
for chaining - See Also:
ClientSecurityConfig
-
setCredentials
public ClientConfig setCredentials(Credentials credentials)
Shortcut forgetSecurityConfig().setCredentials()
- Parameters:
credentials
- Credentials instance to be set- Returns:
- configured
ClientConfig
for chaining
-
getNetworkConfig
public ClientNetworkConfig getNetworkConfig()
GetsClientNetworkConfig
- Returns:
ClientNetworkConfig
- See Also:
ClientNetworkConfig
-
setNetworkConfig
public ClientConfig setNetworkConfig(ClientNetworkConfig networkConfig)
SetsClientNetworkConfig
- Parameters:
networkConfig
-ClientNetworkConfig
to be set- Returns:
- configured
ClientConfig
for chaining - See Also:
ClientNetworkConfig
-
addReliableTopicConfig
public ClientConfig addReliableTopicConfig(ClientReliableTopicConfig reliableTopicConfig)
Adds a ClientReliableTopicConfig.- Parameters:
reliableTopicConfig
- the ClientReliableTopicConfig to add- Returns:
- configured
ClientConfig
for chaining
-
getReliableTopicConfig
public ClientReliableTopicConfig getReliableTopicConfig(java.lang.String name)
Gets the ClientReliableTopicConfig for a given reliable topic name.- Parameters:
name
- the name of the reliable topic- Returns:
- the found config. If none is found, a default configured one is returned.
-
addNearCacheConfig
public ClientConfig addNearCacheConfig(NearCacheConfig nearCacheConfig)
Helper method to add a new NearCacheConfig- Parameters:
nearCacheConfig
-NearCacheConfig
- Returns:
- configured
ClientConfig
for chaining - See Also:
NearCacheConfig
-
addListenerConfig
public ClientConfig addListenerConfig(ListenerConfig listenerConfig)
Helper method to add a new ListenerConfig- Parameters:
listenerConfig
- ListenerConfig- Returns:
- configured
ClientConfig
for chaining - See Also:
ListenerConfig
-
addProxyFactoryConfig
public ClientConfig addProxyFactoryConfig(ProxyFactoryConfig proxyFactoryConfig)
Helper method to add a newProxyFactoryConfig
- Parameters:
proxyFactoryConfig
-ProxyFactoryConfig
- Returns:
- configured
ClientConfig
for chaining - See Also:
ProxyFactoryConfig
-
getNearCacheConfig
public NearCacheConfig getNearCacheConfig(java.lang.String name)
Gets theNearCacheConfig
configured for the map / cache with name- Parameters:
name
- name of the map / cache- Returns:
- Configured
NearCacheConfig
- See Also:
NearCacheConfig
-
getNearCacheConfigMap
public java.util.Map<java.lang.String,NearCacheConfig> getNearCacheConfigMap()
Map of all configured NearCacheConfig's with the name key and configuration as the value- Returns:
- map of NearCacheConfig
- See Also:
NearCacheConfig
-
setNearCacheConfigMap
public ClientConfig setNearCacheConfigMap(java.util.Map<java.lang.String,NearCacheConfig> nearCacheConfigMap)
Sets allNearCacheConfig
's with the provided map- Parameters:
nearCacheConfigMap
- map of (name,NearCacheConfig
)- Returns:
- configured
ClientConfig
for chaining
-
getFlakeIdGeneratorConfigMap
public java.util.Map<java.lang.String,ClientFlakeIdGeneratorConfig> getFlakeIdGeneratorConfigMap()
Returns the map ofFlakeIdGenerator
configurations, mapped by config name. The config name may be a pattern with which the configuration was initially obtained.- Returns:
- the map configurations mapped by config name
-
findFlakeIdGeneratorConfig
public ClientFlakeIdGeneratorConfig findFlakeIdGeneratorConfig(java.lang.String name)
Returns aClientFlakeIdGeneratorConfig
configuration for the given flake ID generator name.The name is matched by pattern to the configuration and by stripping the partition ID qualifier from the given
name
. If there is no config found by the name, it will return the configuration with the name"default"
.- Parameters:
name
- name of the flake ID generator config- Returns:
- the flake ID generator configuration
- Throws:
InvalidConfigurationException
- if ambiguous configurations are found- See Also:
StringPartitioningStrategy.getBaseName(java.lang.String)
,setConfigPatternMatcher(ConfigPatternMatcher)
,getConfigPatternMatcher()
-
getFlakeIdGeneratorConfig
public ClientFlakeIdGeneratorConfig getFlakeIdGeneratorConfig(java.lang.String name)
Returns theClientFlakeIdGeneratorConfig
for the given name, creating one if necessary and adding it to the collection of known configurations.The configuration is found by matching the the configuration name pattern to the provided
name
without the partition qualifier (the part of the name after'@'
). If no configuration matches, it will create one by cloning the"default"
configuration and add it to the configuration collection.This method is intended to easily and fluently create and add configurations more specific than the default configuration without explicitly adding it by invoking
addFlakeIdGeneratorConfig(ClientFlakeIdGeneratorConfig)
.Because it adds new configurations if they are not already present, this method is intended to be used before this config is used to create a hazelcast instance. Afterwards, newly added configurations may be ignored.
- Parameters:
name
- name of the flake ID generator config- Returns:
- the cache configuration
- Throws:
InvalidConfigurationException
- if ambiguous configurations are found- See Also:
StringPartitioningStrategy.getBaseName(java.lang.String)
,setConfigPatternMatcher(ConfigPatternMatcher)
,getConfigPatternMatcher()
-
addFlakeIdGeneratorConfig
public ClientConfig addFlakeIdGeneratorConfig(ClientFlakeIdGeneratorConfig config)
Adds a flake ID generator configuration. The configuration is saved under the config name, which may be a pattern with which the configuration will be obtained in the future.- Parameters:
config
- the flake ID configuration- Returns:
- this config instance
-
setFlakeIdGeneratorConfigMap
public ClientConfig setFlakeIdGeneratorConfigMap(java.util.Map<java.lang.String,ClientFlakeIdGeneratorConfig> map)
Sets the map ofFlakeIdGenerator
configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future.- Parameters:
map
- the FlakeIdGenerator configuration map to set- Returns:
- this config instance
-
setReliableTopicConfigMap
public ClientConfig setReliableTopicConfigMap(java.util.Map<java.lang.String,ClientReliableTopicConfig> map)
Sets the map ofClientReliableTopicConfig
, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future.- Parameters:
map
- the FlakeIdGenerator configuration map to set- Returns:
- this config instance
-
getReliableTopicConfigMap
public java.util.Map<java.lang.String,ClientReliableTopicConfig> getReliableTopicConfigMap()
Returns the map of reliable topic configurations, mapped by config name. The config name may be a pattern with which the configuration was initially obtained.- Returns:
- the map configurations mapped by config name
-
getListenerConfigs
public java.util.List<ListenerConfig> getListenerConfigs()
Gets list of all configuredListenerConfig
's- Returns:
ListenerConfig
- See Also:
ListenerConfig
-
setListenerConfigs
public ClientConfig setListenerConfigs(java.util.List<ListenerConfig> listenerConfigs)
Sets allListenerConfig
's- Parameters:
listenerConfigs
- list ofListenerConfig
- Returns:
- configured
ClientConfig
for chaining - See Also:
ListenerConfig
-
getLoadBalancer
public LoadBalancer getLoadBalancer()
Gets LoadBalancer- Returns:
- LoadBalancer
- See Also:
LoadBalancer
-
setLoadBalancer
public ClientConfig setLoadBalancer(LoadBalancer loadBalancer)
Sets theLoadBalancer
.If a load balancer class name was set, it will be removed.
- Parameters:
loadBalancer
-LoadBalancer
- Returns:
- configured
ClientConfig
for chaining - See Also:
LoadBalancer
-
getLoadBalancerClassName
public java.lang.String getLoadBalancerClassName()
Gets load balancer class name- Returns:
- load balancer class name
- See Also:
LoadBalancer
-
setLoadBalancerClassName
public ClientConfig setLoadBalancerClassName(@Nonnull java.lang.String loadBalancerClassName)
Sets load balancer class name.If a load balancer implementation was set, it will be removed.
- Parameters:
loadBalancerClassName
-LoadBalancer
- Returns:
- configured
ClientConfig
for chaining - See Also:
LoadBalancer
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Gets the classLoader- Returns:
- configured classLoader, null if not yet configured
-
setClassLoader
public ClientConfig setClassLoader(java.lang.ClassLoader classLoader)
Sets the classLoader which is used by serialization and listener configuration- Parameters:
classLoader
- the classLoader- Returns:
- configured
ClientConfig
for chaining
-
getManagedContext
public ManagedContext getManagedContext()
GetsManagedContext
- Returns:
ManagedContext
- See Also:
ManagedContext
-
setManagedContext
public ClientConfig setManagedContext(ManagedContext managedContext)
SetsManagedContext
- Parameters:
managedContext
-ManagedContext
- Returns:
- configured
ClientConfig
for chaining - See Also:
ManagedContext
-
getProxyFactoryConfigs
public java.util.List<ProxyFactoryConfig> getProxyFactoryConfigs()
Gets list ofProxyFactoryConfig
- Returns:
- list of
ProxyFactoryConfig
- See Also:
ProxyFactoryConfig
-
setProxyFactoryConfigs
public ClientConfig setProxyFactoryConfigs(java.util.List<ProxyFactoryConfig> proxyFactoryConfigs)
Sets theProxyFactoryConfig
- Parameters:
proxyFactoryConfigs
- list to assign- Returns:
- configured
ClientConfig
for chaining
-
getSerializationConfig
public SerializationConfig getSerializationConfig()
GetsSerializationConfig
- Returns:
- SerializationConfig
- See Also:
SerializationConfig
-
setSerializationConfig
public ClientConfig setSerializationConfig(SerializationConfig serializationConfig)
SetsSerializationConfig
- Parameters:
serializationConfig
- SerializationConfig- Returns:
- configured
ClientConfig
for chaining - See Also:
SerializationConfig
-
getNativeMemoryConfig
public NativeMemoryConfig getNativeMemoryConfig()
-
setNativeMemoryConfig
public ClientConfig setNativeMemoryConfig(NativeMemoryConfig nativeMemoryConfig)
-
addQueryCacheConfig
public ClientConfig addQueryCacheConfig(java.lang.String mapName, QueryCacheConfig queryCacheConfig)
-
getQueryCacheConfigs
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,QueryCacheConfig>> getQueryCacheConfigs()
-
setQueryCacheConfigs
public ClientConfig setQueryCacheConfigs(java.util.Map<java.lang.String,java.util.Map<java.lang.String,QueryCacheConfig>> queryCacheConfigs)
-
getInstanceName
public java.lang.String getInstanceName()
-
setInstanceName
public ClientConfig setInstanceName(java.lang.String instanceName)
-
getClusterName
public java.lang.String getClusterName()
Returns the configured cluster name. The name is sent as part of client authentication message and may be verified on the member.- Returns:
- the configured cluster name
-
setClusterName
public ClientConfig setClusterName(java.lang.String clusterName)
-
getConnectionStrategyConfig
public ClientConnectionStrategyConfig getConnectionStrategyConfig()
-
setConnectionStrategyConfig
public ClientConfig setConnectionStrategyConfig(ClientConnectionStrategyConfig connectionStrategyConfig)
-
getUserCodeDeploymentConfig
public ClientUserCodeDeploymentConfig getUserCodeDeploymentConfig()
Get current configuration of User Code Deployment.- Returns:
- User Code Deployment configuration
- Since:
- 3.9
-
setUserCodeDeploymentConfig
public ClientConfig setUserCodeDeploymentConfig(ClientUserCodeDeploymentConfig userCodeDeploymentConfig)
Set User Code Deployment configuration- Parameters:
userCodeDeploymentConfig
- the configuration of User Code Deployment- Returns:
- configured
ClientConfig
for chaining - Since:
- 3.9
-
getOrCreateQueryCacheConfig
public QueryCacheConfig getOrCreateQueryCacheConfig(java.lang.String mapName, java.lang.String cacheName)
- Parameters:
mapName
- The name of the map for which the query cache config is to be returned.cacheName
- The name of the query cache.- Returns:
- The query cache config. If the config does not exist, it is created.
-
getOrNullQueryCacheConfig
public QueryCacheConfig getOrNullQueryCacheConfig(java.lang.String mapName, java.lang.String cacheName)
- Parameters:
mapName
- The name of the map for which the query cache config is to be returned.cacheName
- The name of the query cache.- Returns:
- The query cache config. If no such config exist null is returned.
-
addLabel
public ClientConfig addLabel(java.lang.String label)
Adds a label for this clientClient
available- Parameters:
label
- The label to be added.- Returns:
- configured
ClientConfig
for chaining
-
getLabels
public java.util.Set<java.lang.String> getLabels()
- Returns:
- all the labels assigned to this client
-
setLabels
public ClientConfig setLabels(java.util.Set<java.lang.String> labels)
Set labels for the client. Deletes old labels if added earlier.- Parameters:
labels
- The labels to be set- Returns:
- configured
ClientConfig
for chaining
-
setUserContext
public ClientConfig setUserContext(java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> userContext)
-
getUserContext
public java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> getUserContext()
-
setBackupAckToClientEnabled
public ClientConfig setBackupAckToClientEnabled(boolean backupAckToClientEnabled)
This feature reduces number of hops and increase performance for smart clients. It is enabled by default for smart clients. This config has no effect for unisocket clients.- Parameters:
backupAckToClientEnabled
- enables client to get backup acknowledgements directly from the member that backups are applied- Returns:
- configured
ClientConfig
for chaining
-
isBackupAckToClientEnabled
public boolean isBackupAckToClientEnabled()
Note that backup acks to client can be enabled only for smart client. This config has no effect for unisocket clients.- Returns:
- true if backup acknowledgements comes to client
-
getMetricsConfig
@Nonnull public ClientMetricsConfig getMetricsConfig()
Returns the metrics collection config.
-
setMetricsConfig
@Nonnull public ClientConfig setMetricsConfig(@Nonnull ClientMetricsConfig metricsConfig)
Sets the metrics collection config.
-
getInstanceTrackingConfig
@Nonnull public InstanceTrackingConfig getInstanceTrackingConfig()
Returns the configuration for tracking use of this Hazelcast instance.
-
setInstanceTrackingConfig
@Nonnull public ClientConfig setInstanceTrackingConfig(@Nonnull InstanceTrackingConfig instanceTrackingConfig)
Returns the configuration for tracking use of this Hazelcast instance.
-
getSqlConfig
@Nonnull public ClientSqlConfig getSqlConfig()
Returns the configuration for the SQL feature.- Since:
- 5.2
-
setSqlConfig
@Nonnull public ClientConfig setSqlConfig(ClientSqlConfig sqlConfig)
Sets the configuration for the SQL feature.- Since:
- 5.2
-
getTpcConfig
@Beta @Nonnull public ClientTpcConfig getTpcConfig()
Returns the ClientTpcConfig- Returns:
- the ClientTpcConfig
- Since:
- 5.3
-
setTpcConfig
@Beta @Nonnull public ClientConfig setTpcConfig(@Nonnull ClientTpcConfig tpcConfig)
Sets the TpcConfig- Parameters:
tpcConfig
- TpcConfig to set- Returns:
- configured
ClientConfig
for chaining - Throws:
java.lang.IllegalArgumentException
- if thetpcConfig
isnull
- Since:
- 5.3
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-