use of net.sf.ehcache.config.SearchAttribute in project joynr by bmwcarit.
the class DomainAccessControlStoreEhCache method createDrtCache.
private Cache createDrtCache() {
// configure cache as searchable
CacheConfiguration cacheConfig = new CacheConfiguration(CacheId.DOMAIN_ROLES.getIdAsString(), 0).eternal(true);
Searchable searchable = new Searchable();
cacheConfig.addSearchable(searchable);
// register searchable attributes
searchable.addSearchAttribute(new SearchAttribute().name(UserRoleKey.USER_ID));
searchable.addSearchAttribute(new SearchAttribute().name(UserRoleKey.ROLE));
cacheManager.addCache(new Cache(cacheConfig));
return cacheManager.getCache(CacheId.DOMAIN_ROLES.getIdAsString());
}
use of net.sf.ehcache.config.SearchAttribute in project joynr by bmwcarit.
the class DomainAccessControlStoreEhCache method createAclCache.
private Cache createAclCache(CacheId cacheId) {
// configure cache as searchable
CacheConfiguration cacheConfig = new CacheConfiguration(cacheId.getIdAsString(), 0).eternal(true);
Searchable searchable = new Searchable();
cacheConfig.addSearchable(searchable);
// register searchable attributes
searchable.addSearchAttribute(new SearchAttribute().name(UserDomainInterfaceOperationKey.USER_ID));
searchable.addSearchAttribute(new SearchAttribute().name(UserDomainInterfaceOperationKey.DOMAIN));
searchable.addSearchAttribute(new SearchAttribute().name(UserDomainInterfaceOperationKey.INTERFACE));
searchable.addSearchAttribute(new SearchAttribute().name(UserDomainInterfaceOperationKey.OPERATION));
cacheManager.addCache(new Cache(cacheConfig));
return cacheManager.getCache(cacheId.getIdAsString());
}
Aggregations