org.wildfly.swarm.config.ejb3

## Class StrictMaxBeanInstancePool<T extends StrictMaxBeanInstancePool<T>>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap
    - - org.wildfly.swarm.config.ejb3.StrictMaxBeanInstancePool<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class StrictMaxBeanInstancePool<T extends StrictMaxBeanInstancePool<T>>
      extends HashMap

  A bean instance pool with a strict upper limit
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StrictMaxBeanInstancePool.DeriveSize`
    `static class` | `StrictMaxBeanInstancePool.TimeoutUnit`

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StrictMaxBeanInstancePool(String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `StrictMaxBeanInstancePool.DeriveSize` | `deriveSize()` Specifies if and what the max pool size should be derived from.
    `T` | `deriveSize(StrictMaxBeanInstancePool.DeriveSize value)` Specifies if and what the max pool size should be derived from.
    `String` | `getKey()`
    `Integer` | `maxPoolSize()` The maximum number of bean instances that the pool can hold at a given point in time
    `T` | `maxPoolSize(Integer value)` The maximum number of bean instances that the pool can hold at a given point in time
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `Long` | `timeout()` The maximum amount of time to wait for a bean instance to be available from the pool
    `T` | `timeout(Long value)` The maximum amount of time to wait for a bean instance to be available from the pool
    `StrictMaxBeanInstancePool.TimeoutUnit` | `timeoutUnit()` The instance acquisition timeout unit
    `T` | `timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit value)` The instance acquisition timeout unit

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### StrictMaxBeanInstancePool

          public StrictMaxBeanInstancePool(String key)

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### deriveSize

          public StrictMaxBeanInstancePool.DeriveSize deriveSize()

      Specifies if and what the max pool size should be derived from. A value of 'none', the default, indicates that the explicit value of max-pool-size should be used. A value of 'from-worker-pools' indicates that the max pool size should be derived from the size of the total threads for all worker pools configured on the system. A value of 'from-cpu-count' indicates that the max pool size should be derived from the total number of processors available on the system. Note that the computation isn't a 1:1 mapping, the values may or may not be augmented by other factors.

    - #### deriveSize

          public T deriveSize(StrictMaxBeanInstancePool.DeriveSize value)

      Specifies if and what the max pool size should be derived from. A value of 'none', the default, indicates that the explicit value of max-pool-size should be used. A value of 'from-worker-pools' indicates that the max pool size should be derived from the size of the total threads for all worker pools configured on the system. A value of 'from-cpu-count' indicates that the max pool size should be derived from the total number of processors available on the system. Note that the computation isn't a 1:1 mapping, the values may or may not be augmented by other factors.

    - #### maxPoolSize

          public Integer maxPoolSize()

      The maximum number of bean instances that the pool can hold at a given point in time

    - #### maxPoolSize

          public T maxPoolSize(Integer value)

      The maximum number of bean instances that the pool can hold at a given point in time

    - #### timeout

          public Long timeout()

      The maximum amount of time to wait for a bean instance to be available from the pool

    - #### timeout

          public T timeout(Long value)

      The maximum amount of time to wait for a bean instance to be available from the pool

    - #### timeoutUnit

          public StrictMaxBeanInstancePool.TimeoutUnit timeoutUnit()

      The instance acquisition timeout unit

    - #### timeoutUnit

          public T timeoutUnit(StrictMaxBeanInstancePool.TimeoutUnit value)

      The instance acquisition timeout unit

Copyright © 2017 JBoss by Red Hat. All rights reserved.