Class QueryPolicyFactoryBean
java.lang.Object
org.springframework.data.aerospike.config.ReadPolicyFactoryBean
org.springframework.data.aerospike.config.QueryPolicyFactoryBean
- All Implemented Interfaces:
FactoryBean<com.aerospike.client.policy.Policy>
A
FactoryBean implementation that exposes the setters necessary to configure a QueryPolicy 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 TypeMethodDescriptioncom.aerospike.client.policy.QueryPolicyClass<?> booleanvoidsetMaxConcurrentNodes(int maxConcurrentNodes) Configures the maximum number of concurrent requests to server nodes at any point in time.voidsetRecordQueueSize(int recordQueueSize) Configure the number of records to place in queue before blocking.Methods inherited from class org.springframework.data.aerospike.config.ReadPolicyFactoryBean
setMaxRetries, setSleepBetweenRetries, setSocketTimeout, setTotalTimeout
-
Constructor Details
-
QueryPolicyFactoryBean
public QueryPolicyFactoryBean()Creates a newQueryPolicyFactoryBean.
-
-
Method Details
-
setMaxConcurrentNodes
public void setMaxConcurrentNodes(int maxConcurrentNodes) Configures the maximum number of concurrent requests to server nodes at any point in time. If there are 16 nodes in the cluster and maxConcurrentNodes is 8, then queries will be made to 8 nodes in parallel. When a query completes, a new query will be issued until all 16 nodes have been queried. Default (0) is to issue requests to all server nodes in parallel.- Parameters:
maxConcurrentNodes- The maxConcurrentNodes configuration value.
-
setRecordQueueSize
public void setRecordQueueSize(int recordQueueSize) Configure the number of records to place in queue before blocking. Records received from multiple server nodes will be placed in a queue. A separate thread consumes these records in parallel. If the queue is full, the producer threads will block until records are consumed.- Parameters:
recordQueueSize- The recordQueueSize configuration value.
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<com.aerospike.client.policy.Policy>- Overrides:
getObjectin classReadPolicyFactoryBean- Throws:
Exception
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceFactoryBean<com.aerospike.client.policy.Policy>- Overrides:
isSingletonin classReadPolicyFactoryBean
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<com.aerospike.client.policy.Policy>- Overrides:
getObjectTypein classReadPolicyFactoryBean
-