Class ClientPolicyFactoryBean
java.lang.Object
org.springframework.data.aerospike.config.ClientPolicyFactoryBean
- All Implemented Interfaces:
FactoryBean<com.aerospike.client.policy.ClientPolicy>
public class ClientPolicyFactoryBean
extends Object
implements FactoryBean<com.aerospike.client.policy.ClientPolicy>
A
FactoryBean implementation that exposes the setters necessary to configure a ClientPolicy via XML.- Author:
- Peter Milne
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfailIfNotConnected(boolean failIfNotConnected) Configures the action if the client cannot connect to a host.com.aerospike.client.policy.ClientPolicyClass<?> booleanvoidsetBatchPolicyDefault(com.aerospike.client.policy.BatchPolicy batchPolicy) Configures the default batch policyvoidsetMaxConnsPerNode(int maxConnsPerNode) Configures the maximum number of connections for operation processing.voidsetMaxSocketIdle(int maxSocketIdle) Configures the maximum socket idle time for the client.voidsetPassword(String password) Configures the User password for authentication to cluster.voidsetQueryPolicyDefault(com.aerospike.client.policy.QueryPolicy queryPolicy) Configures the default query policyvoidsetReadPolicyDefault(com.aerospike.client.policy.Policy readPolicy) Configures the default read policyvoidsetScanPolicyDefault(com.aerospike.client.policy.ScanPolicy scanPolicy) Configures the default scan policyvoidsetTendInterval(int tendInterval) Configures the tendInterval, in milliseconds, between cluster tends, by maintenance thread.voidsetTimeout(int timeout) Configures the timeout for a client connection when opening a connection to the server host for the first time.voidConfigures the username for authentication to cluster.voidsetWritePolicyDefault(com.aerospike.client.policy.WritePolicy writePolicy) Configures the default write policy
-
Constructor Details
-
ClientPolicyFactoryBean
public ClientPolicyFactoryBean()Creates a newClientPolicyFactoryBean.
-
-
Method Details
-
setMaxConnsPerNode
public void setMaxConnsPerNode(int maxConnsPerNode) Configures the maximum number of connections for operation processing. This value is used to size the synchronous connection pool for each server node.- Parameters:
maxConnsPerNode- The maxConnsPerNode configuration value.
-
setTimeout
public void setTimeout(int timeout) Configures the timeout for a client connection when opening a connection to the server host for the first time.- Parameters:
timeout- The timeout configuration value.
-
setMaxSocketIdle
public void setMaxSocketIdle(int maxSocketIdle) Configures the maximum socket idle time for the client. Socket connection pools will discard sockets that have been idle longer than the maximum- Parameters:
maxSocketIdle- The maxSocketIdle configuration value.
-
failIfNotConnected
public void failIfNotConnected(boolean failIfNotConnected) Configures the action if the client cannot connect to a host. If true the client will throw exception if host connection fails during connection.- Parameters:
failIfNotConnected- The failIfNotConnected configuration value.
-
setTendInterval
public void setTendInterval(int tendInterval) Configures the tendInterval, in milliseconds, between cluster tends, by maintenance thread.- Parameters:
tendInterval- The tendInterval configuration value.
-
setReadPolicyDefault
public void setReadPolicyDefault(com.aerospike.client.policy.Policy readPolicy) Configures the default read policy- Parameters:
readPolicy- The readPolicy configuration value.
-
setWritePolicyDefault
public void setWritePolicyDefault(com.aerospike.client.policy.WritePolicy writePolicy) Configures the default write policy- Parameters:
writePolicy- The writePolicy configuration value.
-
setScanPolicyDefault
public void setScanPolicyDefault(com.aerospike.client.policy.ScanPolicy scanPolicy) Configures the default scan policy- Parameters:
scanPolicy- The scanPolicy configuration value.
-
setBatchPolicyDefault
public void setBatchPolicyDefault(com.aerospike.client.policy.BatchPolicy batchPolicy) Configures the default batch policy- Parameters:
batchPolicy- The batchPolicy configuration value.
-
setQueryPolicyDefault
public void setQueryPolicyDefault(com.aerospike.client.policy.QueryPolicy queryPolicy) Configures the default query policy- Parameters:
queryPolicy- The queryPolicy configuration value.
-
setUser
Configures the username for authentication to cluster. Only used for clusters running with security enabled.- Parameters:
user- The user configuration value.
-
setPassword
Configures the User password for authentication to cluster. Only used for clusters running with security enabled.- Parameters:
password- The password configuration value.
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<com.aerospike.client.policy.ClientPolicy>- Throws:
Exception
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceFactoryBean<com.aerospike.client.policy.ClientPolicy>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<com.aerospike.client.policy.ClientPolicy>
-