Class ReadPolicyFactoryBean

java.lang.Object
org.springframework.data.aerospike.config.ReadPolicyFactoryBean
All Implemented Interfaces:
FactoryBean<com.aerospike.client.policy.Policy>
Direct Known Subclasses:
BatchPolicyFactoryBean, QueryPolicyFactoryBean, ScanPolicyFactoryBean, WritePolicyFactoryBean

public class ReadPolicyFactoryBean extends Object implements FactoryBean<com.aerospike.client.policy.Policy>
A FactoryBean implementation that exposes the setters necessary to configure a read policy via XML.
Author:
Peter Milne
  • Constructor Details

  • Method Details

    • setSocketTimeout

      public void setSocketTimeout(int socketTimeout)
      Configures the timeout for each transaction attempt of an operation.
      Parameters:
      socketTimeout - The socketTimeout configuration value.
    • setTotalTimeout

      public void setTotalTimeout(int totalTimeout)
      Configures the timeout for an operation.
      Parameters:
      totalTimeout - The totalTimeout configuration value.
    • setMaxRetries

      public void setMaxRetries(int maxRetries)
      Configures the maximum number of retries before aborting the current transaction. A retry is attempted when there is a network error other than timeout. If maxRetries is exceeded, the abort will occur even if the timeout has not yet been exceeded. The default number of retries is 1.
      Parameters:
      maxRetries - The maxRetries configuration value.
    • setSleepBetweenRetries

      public void setSleepBetweenRetries(int sleepBetweenRetries)
      Configures the sleep between retries if a transaction fails and the timeout was not exceeded. Enter zero to skip sleep. The default sleep between retries is 500 ms.
      Parameters:
      sleepBetweenRetries - The sleepBetweenRetries configuration value.
    • getObject

      public com.aerospike.client.policy.Policy getObject() throws Exception
      Specified by:
      getObject in interface FactoryBean<com.aerospike.client.policy.Policy>
      Throws:
      Exception
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface FactoryBean<com.aerospike.client.policy.Policy>
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface FactoryBean<com.aerospike.client.policy.Policy>