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
    Constructor Description
    ClientPolicyFactoryBean()
  • Method Summary

    Modifier and Type Method Description
    void failIfNotConnected​(boolean failIfNotConnected)
    Configures the action if the client cannot connect to a host.
    com.aerospike.client.policy.ClientPolicy getObject()  
    Class<?> getObjectType()  
    boolean isSingleton()  
    void setBatchPolicyDefault​(com.aerospike.client.policy.BatchPolicy batchPolicy)
    Configures the default batch policy
    void setMaxConnsPerNode​(int maxConnsPerNode)
    Configures the maximum number of connections for operation processing.
    void setMaxSocketIdle​(int maxSocketIdle)
    Configures the maximum socket idle time for the client.
    void setPassword​(String password)
    Configures the User password for authentication to cluster.
    void setQueryPolicyDefault​(com.aerospike.client.policy.QueryPolicy queryPolicy)
    Configures the default query policy
    void setReadPolicyDefault​(com.aerospike.client.policy.Policy readPolicy)
    Configures the default read policy
    void setScanPolicyDefault​(com.aerospike.client.policy.ScanPolicy scanPolicy)
    Configures the default scan policy
    void setTendInterval​(int tendInterval)
    Configures the tend interval, in milliseconds, between cluster tends, by maintenance thread.
    void setTimeout​(int timeout)
    Configures the timeout for a client connection when opening a connection to the server host for the first time.
    void setUser​(String user)
    Configures the User name for authentication to cluster.
    void setWritePolicyDefault​(com.aerospike.client.policy.WritePolicy writePolicy)
    Configures the default write policy

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 tend interval, 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 User name 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>