If a {@link Cache} with the specified name is known to the {@link CacheManager}, a CacheException is thrown.
If a {@link Cache} with the specified name is unknown the {@link CacheManager}, one is created according to the provided {@link Configuration}after which it becomes managed by the {@link CacheManager}.
Prior to a {@link Cache} being created, the provided {@link Configuration}s is validated within the context of the {@link CacheManager} properties andimplementation.
Implementers should be aware that the {@link Configuration} may be used toconfigure other {@link Cache}s.
There's no requirement on the part of a developer to call this method for each {@link Cache} an application may use. Implementations may supportthe use of declarative mechanisms to pre-configure {@link Cache}s, thus removing the requirement to configure them in an application. In such circumstances a developer may simply call either the {@link #getCache(String)} or {@link #getCache(String,Class,Class)}methods to acquire a previously established or pre-configured {@link Cache}. @param cacheName the name of the {@link Cache} @param configuration a {@link Configuration} for the {@link Cache} @throws IllegalStateException if the {@link CacheManager}{@link #isClosed()} @throws CacheException if there was an error configuring the{@link Cache}, which includes trying to create a cache that already exists. @throws IllegalArgumentException if the configuration is invalid @throws UnsupportedOperationException if the configuration specifiesan unsupported feature @throws NullPointerException if the cache configuration or nameis null @throws SecurityException when the operation could not be performeddue to the current security settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|