com.hazelcast.client.config
Class ClientConfig

java.lang.Object
  extended by com.hazelcast.client.config.ClientConfig

public class ClientConfig
extends Object

Main configuration to setup a Hazelcast Client


Constructor Summary
ClientConfig()
           
 
Method Summary
 ClientConfig addAddress(String... addresses)
          Deprecated. 
 ClientConfig addListenerConfig(ListenerConfig listenerConfig)
          Helper method to add a new ListenerConfig
 ClientConfig addNearCacheConfig(NearCacheConfig nearCacheConfig)
          Helper method to add a new NearCacheConfig
 ClientConfig addNearCacheConfig(String mapName, NearCacheConfig nearCacheConfig)
          Deprecated. 
 ClientConfig addProxyFactoryConfig(ProxyFactoryConfig proxyFactoryConfig)
          Helper method to add a new ProxyFactoryConfig
 List<String> getAddresses()
          Deprecated. 
 ClassLoader getClassLoader()
          Gets the classLoader
 int getConnectionAttemptLimit()
          Deprecated. 
 int getConnectionAttemptPeriod()
          Deprecated. 
 int getConnectionTimeout()
          Deprecated. 
 Credentials getCredentials()
          Gets Credentials
 int getExecutorPoolSize()
          Pool size for internal ExecutorService which handles responses etc.
 GroupConfig getGroupConfig()
          gets GroupConfig
 List<ListenerConfig> getListenerConfigs()
          Gets list of all configured ListenerConfig's
 LoadBalancer getLoadBalancer()
          Gets LoadBalancer
 ManagedContext getManagedContext()
          Gets ManagedContext
 NativeMemoryConfig getNativeMemoryConfig()
           
 NearCacheConfig getNearCacheConfig(String mapName)
          Gets the NearCacheConfig configured for the map with mapName
 Map<String,NearCacheConfig> getNearCacheConfigMap()
          Map of all configured NearCacheConfig's with the map name key and configuration as the value
 ClientNetworkConfig getNetworkConfig()
          Gets ClientNetworkConfig
 Properties getProperties()
          Gets Properties object
 String getProperty(String name)
          Gets a property already set or from system properties if not exists.
 List<ProxyFactoryConfig> getProxyFactoryConfigs()
          Gets list of ProxyFactoryConfig
 ClientSecurityConfig getSecurityConfig()
          Gets ClientSecurityConfig object
 SerializationConfig getSerializationConfig()
          Gets SerializationConfig
 SocketInterceptorConfig getSocketInterceptorConfig()
          Deprecated. 
 SocketOptions getSocketOptions()
          Deprecated. 
 boolean isRedoOperation()
          Deprecated. 
 boolean isSmartRouting()
          Deprecated. 
 ClientConfig setAddresses(List<String> addresses)
          Deprecated. 
 ClientConfig setClassLoader(ClassLoader classLoader)
          Sets the classLoader which is used by serialization and listener configuration
 ClientConfig setConnectionAttemptLimit(int connectionAttemptLimit)
          Deprecated. 
 ClientConfig setConnectionAttemptPeriod(int connectionAttemptPeriod)
          Deprecated. 
 ClientConfig setConnectionTimeout(int connectionTimeout)
          Deprecated. 
 ClientConfig setCredentials(Credentials credentials)
          Sets Credentials
 ClientConfig setExecutorPoolSize(int executorPoolSize)
          Sets Client side Executor pool size.
 ClientConfig setGroupConfig(GroupConfig groupConfig)
          Sets GroupConfig
 ClientConfig setListenerConfigs(List<ListenerConfig> listenerConfigs)
          Sets all ListenerConfig's
 ClientConfig setLoadBalancer(LoadBalancer loadBalancer)
          Sets the LoadBalancer
 ClientConfig setManagedContext(ManagedContext managedContext)
          Sets ManagedContext
 ClientConfig setNativeMemoryConfig(NativeMemoryConfig nativeMemoryConfig)
           
 ClientConfig setNearCacheConfigMap(Map<String,NearCacheConfig> nearCacheConfigMap)
          Sets all NearCacheConfig's with the provided map
 ClientConfig setNetworkConfig(ClientNetworkConfig networkConfig)
          Sets ClientNetworkConfig
 ClientConfig setProperties(Properties properties)
          sets all properties
 ClientConfig setProperty(String name, String value)
          Sets the value of a named property
 ClientConfig setProxyFactoryConfigs(List<ProxyFactoryConfig> proxyFactoryConfigs)
          Sets the ProxyFactoryConfig
 ClientConfig setRedoOperation(boolean redoOperation)
          Deprecated. 
 ClientConfig setSecurityConfig(ClientSecurityConfig securityConfig)
          Sets ClientSecurityConfig object
 ClientConfig setSerializationConfig(SerializationConfig serializationConfig)
          Sets SerializationConfig
 ClientConfig setSmartRouting(boolean smartRouting)
          Deprecated. 
 ClientConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
          Deprecated. 
 ClientConfig setSocketOptions(SocketOptions socketOptions)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientConfig

public ClientConfig()
Method Detail

getProperty

public String getProperty(String name)
Gets a property already set or from system properties if not exists.

Parameters:
name - property name
Returns:
value of the property

setProperty

public ClientConfig setProperty(String name,
                                String value)
Sets the value of a named property

Parameters:
name - property name
value - value of the property
Returns:
configured ClientConfig for chaining
See Also:
com.hazelcast.client.config.ClientProperties} for properties that is used to configure client

getProperties

public Properties getProperties()
Gets Properties object

Returns:
Properties object

setProperties

public ClientConfig setProperties(Properties properties)
sets all properties

Parameters:
properties - Properties object
Returns:
configured ClientConfig for chaining

getSecurityConfig

public ClientSecurityConfig getSecurityConfig()
Gets ClientSecurityConfig object

Returns:
ClientSecurityConfig
See Also:
ClientSecurityConfig

setSecurityConfig

public ClientConfig setSecurityConfig(ClientSecurityConfig securityConfig)
Sets ClientSecurityConfig object

Parameters:
securityConfig - ClientSecurityConfig to be set
Returns:
configured ClientConfig for chaining
See Also:
ClientSecurityConfig

getNetworkConfig

public ClientNetworkConfig getNetworkConfig()
Gets ClientNetworkConfig

Returns:
ClientNetworkConfig
See Also:
ClientNetworkConfig

setNetworkConfig

public ClientConfig setNetworkConfig(ClientNetworkConfig networkConfig)
Sets ClientNetworkConfig

Parameters:
networkConfig - ClientNetworkConfig to be set
Returns:
configured ClientConfig for chaining
See Also:
ClientNetworkConfig

addNearCacheConfig

@Deprecated
public ClientConfig addNearCacheConfig(String mapName,
                                                  NearCacheConfig nearCacheConfig)
Deprecated. 

please use addNearCacheConfig(NearCacheConfig)

Parameters:
mapName - name of the IMap that near cache config will be applied to
nearCacheConfig - nearCacheConfig
Returns:
configured ClientConfig for chaining

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 new ProxyFactoryConfig

Parameters:
proxyFactoryConfig - ProxyFactoryConfig
Returns:
configured ClientConfig for chaining
See Also:
ProxyFactoryConfig

getNearCacheConfig

public NearCacheConfig getNearCacheConfig(String mapName)
Gets the NearCacheConfig configured for the map with mapName

Parameters:
mapName - name of the map
Returns:
Configured NearCacheConfig
See Also:
NearCacheConfig

getNearCacheConfigMap

public Map<String,NearCacheConfig> getNearCacheConfigMap()
Map of all configured NearCacheConfig's with the map name key and configuration as the value

Returns:
map of NearCacheConfig
See Also:
NearCacheConfig

setNearCacheConfigMap

public ClientConfig setNearCacheConfigMap(Map<String,NearCacheConfig> nearCacheConfigMap)
Sets all NearCacheConfig's with the provided map

Parameters:
nearCacheConfigMap - map of (mapName, NearCacheConfig)
Returns:
configured ClientConfig for chaining

isSmartRouting

@Deprecated
public boolean isSmartRouting()
Deprecated. 

Use ClientNetworkConfig.isSmartRouting() instead


setSmartRouting

@Deprecated
public ClientConfig setSmartRouting(boolean smartRouting)
Deprecated. 

Use ClientNetworkConfig.setSmartRouting(boolean) instead


getSocketInterceptorConfig

@Deprecated
public SocketInterceptorConfig getSocketInterceptorConfig()
Deprecated. 

Use ClientNetworkConfig.getSocketInterceptorConfig() instead


setSocketInterceptorConfig

@Deprecated
public ClientConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
Deprecated. 

Use ClientNetworkConfig.setSocketInterceptorConfig(com.hazelcast.config.SocketInterceptorConfig) instead


getConnectionAttemptPeriod

@Deprecated
public int getConnectionAttemptPeriod()
Deprecated. 

Use ClientNetworkConfig.getConnectionAttemptPeriod() instead


setConnectionAttemptPeriod

@Deprecated
public ClientConfig setConnectionAttemptPeriod(int connectionAttemptPeriod)
Deprecated. 

Use ClientNetworkConfig.setConnectionAttemptPeriod(int) instead


getConnectionAttemptLimit

@Deprecated
public int getConnectionAttemptLimit()
Deprecated. 

Use ClientNetworkConfig.getConnectionAttemptLimit() instead


setConnectionAttemptLimit

@Deprecated
public ClientConfig setConnectionAttemptLimit(int connectionAttemptLimit)
Deprecated. 

Use ClientNetworkConfig.setConnectionAttemptLimit(int) instead


getConnectionTimeout

@Deprecated
public int getConnectionTimeout()
Deprecated. 

Use ClientNetworkConfig.getConnectionTimeout() instead


setConnectionTimeout

@Deprecated
public ClientConfig setConnectionTimeout(int connectionTimeout)
Deprecated. 

Use ClientNetworkConfig.setConnectionTimeout(int) instead


getCredentials

public Credentials getCredentials()
Gets Credentials

Returns:
Credentials
See Also:
Credentials

setCredentials

public ClientConfig setCredentials(Credentials credentials)
Sets Credentials

Parameters:
credentials - Credentials
Returns:
configured ClientConfig for chaining

addAddress

@Deprecated
public ClientConfig addAddress(String... addresses)
Deprecated. 

Use ClientNetworkConfig.addAddress(java.lang.String...) instead


setAddresses

@Deprecated
public ClientConfig setAddresses(List<String> addresses)
Deprecated. 

Use ClientNetworkConfig.setAddresses(java.util.List) instead


getAddresses

@Deprecated
public List<String> getAddresses()
Deprecated. 

Use ClientNetworkConfig.getAddresses() instead


getGroupConfig

public GroupConfig getGroupConfig()
gets GroupConfig

Returns:
GroupConfig
See Also:
GroupConfig

setGroupConfig

public ClientConfig setGroupConfig(GroupConfig groupConfig)
Sets GroupConfig

Parameters:
groupConfig - GroupConfig
Returns:
configured ClientConfig for chaining

getListenerConfigs

public List<ListenerConfig> getListenerConfigs()
Gets list of all configured ListenerConfig's

Returns:
ListenerConfig
See Also:
ListenerConfig

setListenerConfigs

public ClientConfig setListenerConfigs(List<ListenerConfig> listenerConfigs)
Sets all ListenerConfig's

Parameters:
listenerConfigs - list of ListenerConfig
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 the LoadBalancer

Parameters:
loadBalancer - LoadBalancer
Returns:
configured ClientConfig for chaining
See Also:
LoadBalancer

isRedoOperation

@Deprecated
public boolean isRedoOperation()
Deprecated. 

Use ClientNetworkConfig.isRedoOperation() instead


setRedoOperation

@Deprecated
public ClientConfig setRedoOperation(boolean redoOperation)
Deprecated. 

Use ClientNetworkConfig.setRedoOperation(boolean) instead


getSocketOptions

@Deprecated
public SocketOptions getSocketOptions()
Deprecated. 

Use ClientNetworkConfig.getSocketOptions() instead


setSocketOptions

@Deprecated
public ClientConfig setSocketOptions(SocketOptions socketOptions)
Deprecated. 

Use ClientNetworkConfig.setSocketOptions(com.hazelcast.client.config.SocketOptions) instead


getClassLoader

public ClassLoader getClassLoader()
Gets the classLoader

Returns:
configured classLoader, null if not yet configured

setClassLoader

public ClientConfig setClassLoader(ClassLoader classLoader)
Sets the classLoader which is used by serialization and listener configuration

Parameters:
classLoader -
Returns:
configured ClientConfig for chaining

getManagedContext

public ManagedContext getManagedContext()
Gets ManagedContext

Returns:
ManagedContext
See Also:
ManagedContext

setManagedContext

public ClientConfig setManagedContext(ManagedContext managedContext)
Sets ManagedContext

Parameters:
managedContext - ManagedContext
Returns:
configured ClientConfig for chaining
See Also:
ManagedContext

getExecutorPoolSize

public int getExecutorPoolSize()
Pool size for internal ExecutorService which handles responses etc.

Returns:
int Executor pool size.

setExecutorPoolSize

public ClientConfig setExecutorPoolSize(int executorPoolSize)
Sets Client side Executor pool size.

Parameters:
executorPoolSize - pool size
Returns:
configured ClientConfig for chaining

getProxyFactoryConfigs

public List<ProxyFactoryConfig> getProxyFactoryConfigs()
Gets list of ProxyFactoryConfig

Returns:
list of ProxyFactoryConfig
See Also:
ProxyFactoryConfig

setProxyFactoryConfigs

public ClientConfig setProxyFactoryConfigs(List<ProxyFactoryConfig> proxyFactoryConfigs)
Sets the ProxyFactoryConfig

Parameters:
proxyFactoryConfigs - list to assign
Returns:
configured ClientConfig for chaining

getSerializationConfig

public SerializationConfig getSerializationConfig()
Gets SerializationConfig

Returns:
SerializationConfig
See Also:
SerializationConfig

setSerializationConfig

public ClientConfig setSerializationConfig(SerializationConfig serializationConfig)
Sets SerializationConfig

Parameters:
serializationConfig - SerializationConfig
Returns:
configured ClientConfig for chaining
See Also:
SerializationConfig

getNativeMemoryConfig

public NativeMemoryConfig getNativeMemoryConfig()

setNativeMemoryConfig

public ClientConfig setNativeMemoryConfig(NativeMemoryConfig nativeMemoryConfig)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.