org.apache.ignite.resources

## Annotation Type CacheNameResource

-     @Documented
       @Retention(value=RUNTIME)
       @Target(value={METHOD,FIELD})
      public @interface CacheNameResource

  Annotates a field or a setter method for injection of grid cache name. Grid cache name is provided to cache via `CacheConfiguration.getName()` method.

  Cache name can be injected into components provided in the `CacheConfiguration`, if `CacheNameResource` annotation is used in another classes it is no-op.

  Here is how injection would typically happen:

       public class MyCacheStore implements GridCacheStore {
            ...
            @CacheNameResource
            private String cacheName;
            ...
        }

  or

       public class MyCacheStore implements GridCacheStore {
           ...
           private String cacheName;
           ...
           @CacheNameResource
           public void setCacheName(String cacheName) {
                this.cacheName = cacheName;
           }
           ...
       }

  See `CacheConfiguration.getName()` for cache configuration details.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022