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
  • Constructor Details

  • 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

      public void setUser(String user)
      Configures the username for authentication to cluster. Only used for clusters running with security enabled.
      Parameters:
      user - The user configuration value.
    • setPassword

      public void setPassword(String password)
      Configures the User password for authentication to cluster. Only used for clusters running with security enabled.
      Parameters:
      password - The password configuration value.
    • getObject

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

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

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