Package org.springframework.cache.jcache

# Class JCacheManagerFactoryBean

java.lang.Object
org.springframework.cache.jcache.JCacheManagerFactoryBean

All Implemented Interfaces:
  `org.springframework.beans.factory.Aware`, `org.springframework.beans.factory.BeanClassLoaderAware`, `org.springframework.beans.factory.DisposableBean`, `org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>`, `org.springframework.beans.factory.InitializingBean`

public class JCacheManagerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
`FactoryBean` for a JCache `javax.cache.CacheManager`, obtaining a pre-defined `CacheManager` by name through the standard JCache `javax.cache.Caching` class.

Note: This class has been updated for JCache 1.0, as of Spring 4.0.

Since:
  3.2
Author:
  Juergen Hoeller
See Also:
  - `Caching.getCachingProvider()`
  - `CachingProvider.getCacheManager()`

## Field Summary

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`JCacheManagerFactoryBean()`

## Method Summary

Modifier and Type
Method
Description
`void`
`afterPropertiesSet()`
`void`
`destroy()`
`javax.cache.CacheManager`
`getObject()`
`Class<?>`
`getObjectType()`
`boolean`
`isSingleton()`
`void`
`setBeanClassLoader(ClassLoader classLoader)`
`void`
`setCacheManagerProperties(Properties cacheManagerProperties)`
Specify properties for the to-be-created `CacheManager`.
`void`
`setCacheManagerUri(URI cacheManagerUri)`
Specify the URI for the desired `CacheManager`.

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

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

## Constructor Details

### JCacheManagerFactoryBean

public JCacheManagerFactoryBean()

## Method Details

### setCacheManagerUri

public void setCacheManagerUri(@Nullable URI cacheManagerUri)
Specify the URI for the desired `CacheManager`.

Default is `null` (i.e. JCache's default).

### setCacheManagerProperties

public void setCacheManagerProperties(@Nullable Properties cacheManagerProperties)
Specify properties for the to-be-created `CacheManager`.

Default is `null` (i.e. no special properties to apply).

See Also:
  - `CachingProvider.getCacheManager(URI, ClassLoader, Properties)`

### setBeanClassLoader

public void setBeanClassLoader(ClassLoader classLoader)

Specified by:
  `setBeanClassLoader` in interface `org.springframework.beans.factory.BeanClassLoaderAware`

### afterPropertiesSet

public void afterPropertiesSet()

Specified by:
  `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`

### getObject

@Nullable public javax.cache.CacheManager getObject()

Specified by:
  `getObject` in interface `org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>`

### getObjectType

public Class<?> getObjectType()

Specified by:
  `getObjectType` in interface `org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>`

### isSingleton

public boolean isSingleton()

Specified by:
  `isSingleton` in interface `org.springframework.beans.factory.FactoryBean<javax.cache.CacheManager>`

### destroy

public void destroy()

Specified by:
  `destroy` in interface `org.springframework.beans.factory.DisposableBean`