org.springframework.cache.concurrent

## 类 ConcurrentMapCacheFactoryBean

- java.lang.Object
- - org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean

- 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.FactoryBean<ConcurrentMapCache>, org.springframework.beans.factory.InitializingBean

      public class ConcurrentMapCacheFactoryBean
      extends Object
      implements org.springframework.beans.factory.FactoryBean<ConcurrentMapCache>, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

  `FactoryBean` for easy configuration of a `ConcurrentMapCache` when used within a Spring container. Can be configured through bean properties; uses the assigned Spring bean name as the default cache name.

  Useful for testing or simple caching scenarios, typically in combination with `SimpleCacheManager` or dynamically through `ConcurrentMapCacheManager`.

  从以下版本开始:
    3.1
  作者:
    Costin Leau, Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `ConcurrentMapCacheFactoryBean()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `afterPropertiesSet()`
    `ConcurrentMapCache` | `getObject()`
    `Class<?>` | `getObjectType()`
    `boolean` | `isSingleton()`
    `void` | `setAllowNullValues(boolean allowNullValues)` Set whether to allow `null` values (adapting them to an internal null holder value).
    `void` | `setBeanName(String beanName)`
    `void` | `setName(String name)` Specify the name of the cache.
    `void` | `setStore(ConcurrentMap<Object,Object> store)` Specify the ConcurrentMap to use as an internal store (possibly pre-populated).

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### ConcurrentMapCacheFactoryBean

          public ConcurrentMapCacheFactoryBean()

  - ### 方法详细资料

    - #### setName

          public void setName(String name)

      Specify the name of the cache.

      Default is "" (empty String).

    - #### setStore

          public void setStore(ConcurrentMap<Object,Object> store)

      Specify the ConcurrentMap to use as an internal store (possibly pre-populated).

      Default is a standard `ConcurrentHashMap`.

    - #### setAllowNullValues

          public void setAllowNullValues(boolean allowNullValues)

      Set whether to allow `null` values (adapting them to an internal null holder value).

      Default is "true".

    - #### setBeanName

          public void setBeanName(String beanName)

      指定者:
        `setBeanName` 在接口中 `org.springframework.beans.factory.BeanNameAware`

    - #### afterPropertiesSet

          public void afterPropertiesSet()

      指定者:
        `afterPropertiesSet` 在接口中 `org.springframework.beans.factory.InitializingBean`

    - #### getObject

          @Nullable
          public ConcurrentMapCache getObject()

      指定者:
        `getObject` 在接口中 `org.springframework.beans.factory.FactoryBean<ConcurrentMapCache>`

    - #### getObjectType

          public Class<?> getObjectType()

      指定者:
        `getObjectType` 在接口中 `org.springframework.beans.factory.FactoryBean<ConcurrentMapCache>`

    - #### isSingleton

          public boolean isSingleton()

      指定者:
        `isSingleton` 在接口中 `org.springframework.beans.factory.FactoryBean<ConcurrentMapCache>`