Class LdapProviderConfig.PoolConfig

java.lang.Object
org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig.PoolConfig
Enclosing class:
LdapProviderConfig

public static class LdapProviderConfig.PoolConfig extends Object
Defines the configuration of a connection pool. Currently we do not support all available configuration options of the pool implementation. (documentation copied from GenericObjectPool)
  • Constructor Details

    • PoolConfig

      public PoolConfig()
  • Method Details

    • getMaxActive

      public int getMaxActive()
      Returns the maximum number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. When non-positive, there is no limit to the number of objects that can be managed by the pool at one time. A value of 0 disables this pool.
      Returns:
      the cap on the total number of object instances managed by the pool.
      See Also:
    • setMaxActive

      @NotNull public @NotNull LdapProviderConfig.PoolConfig setMaxActive(int maxActive)
      Sets the cap on the number of objects that can be allocated by the pool.
      Parameters:
      maxActive - the new upper limit of the pool size
      Returns:
      this
      See Also:
    • lookupOnValidate

      public boolean lookupOnValidate()
      Defines if the lookup on validate flag is enabled. If enable a connection that taken from the pool are validated before used. currently this is done by performing a lookup to the ROOT DSE, which might not be allowed on all LDAP servers.
      Returns:
      true if the flag is enabled.
    • setLookupOnValidate

      @NotNull public @NotNull LdapProviderConfig.PoolConfig setLookupOnValidate(boolean lookupOnValidate)
      Sets the lookup on validate flag.
      Parameters:
      lookupOnValidate - the new value of the lookup on validate flag
      Returns:
      this
      See Also:
    • getMinEvictableIdleTimeMillis

      public long getMinEvictableIdleTimeMillis()
      Returns the minimum amount of time a connection may sit idle in the pool before it is eligible for eviction by the idle object evictor (if running). When non-positive, no connections will be evicted from the pool due to idle time alone.
      Returns:
      minimum amount of time a connection may sit idle in the pool before it is eligible for eviction.
    • setMinEvictableIdleTimeMillis

      public LdapProviderConfig.PoolConfig setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
      Sets the minimum amount of time a connection may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any). When non-positive, no connections will be evicted from the pool due to idle time alone.
      Parameters:
      minEvictableIdleTimeMillis - minimum amount of time a connection may sit idle in the pool before it is eligible for eviction.
      Returns:
      this
    • getTimeBetweenEvictionRunsMillis

      public long getTimeBetweenEvictionRunsMillis()
      Returns the number of milliseconds to sleep between runs of the idle object evictor thread. When non-positive, no idle object evictor thread will be run.
      Returns:
      number of milliseconds to sleep between evictor runs.
    • setTimeBetweenEvictionRunsMillis

      public LdapProviderConfig.PoolConfig setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
      Sets the number of milliseconds to sleep between runs of the idle object evictor thread. When non-positive, no idle object evictor thread will be run.
      Parameters:
      timeBetweenEvictionRunsMillis - number of milliseconds to sleep between evictor runs.
      Returns:
      this
    • getNumTestsPerEvictionRun

      public int getNumTestsPerEvictionRun()
      Returns the max number of objects to examine during each run of the idle object evictor thread (if any).
      Returns:
      max number of objects to examine during each evictor run.
      See Also:
    • setNumTestsPerEvictionRun

      public LdapProviderConfig.PoolConfig setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
      Sets the max number of objects to examine during each run of the idle object evictor thread (if any).

      When a negative value is supplied, ceil(number of idle objects)/abs(getNumTestsPerEvictionRun()) tests will be run. That is, when the value is -n, roughly one nth of the idle objects will be tested per run. When the value is positive, the number of tests actually performed in each run will be the minimum of this value and the number of instances idle in the pool.

      Parameters:
      numTestsPerEvictionRun - max number of objects to examine during each evictor run.
      Returns:
      this
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object