本文整理汇总了Java中net.sf.ehcache.event.RegisteredEventListeners类的典型用法代码示例。如果您正苦于以下问题:Java RegisteredEventListeners类的具体用法?Java RegisteredEventListeners怎么用?Java RegisteredEventListeners使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RegisteredEventListeners类属于net.sf.ehcache.event包,在下文中一共展示了RegisteredEventListeners类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import net.sf.ehcache.event.RegisteredEventListeners; //导入依赖的package包/类
@Before
public void init() {
clusterCache = mockControl.createMock(ClusterCache.class);
cache = mockControl.createMock(Cache.class);
cacheLoader = mockControl.createMock(CacheLoader.class);
c2monCacheLoader = mockControl.createMock(C2monCacheLoader.class);
cacheLoaderDAO = mockControl.createMock(CacheLoaderDAO.class);
supervisionAppender = mockControl.createMock(SupervisionAppender.class);
registeredEventListeners = new RegisteredEventListeners(cache);
dataTagCache = new DataTagCacheImpl(clusterCache, cache, cacheLoader, c2monCacheLoader, cacheLoaderDAO, new CacheProperties());
}
开发者ID:c2mon,项目名称:c2mon,代码行数:12,代码来源:DataTagCacheRegistrationTest.java
示例2: getObject
import net.sf.ehcache.event.RegisteredEventListeners; //导入依赖的package包/类
@Override
public CrigttCache getObject() throws Exception {
String name = this.config.getName();
if (name == null) {
this.config.setName((name = this.beanName));
}
Optional.ofNullable(this.maxBytesLocalDisk).ifPresent(this.config::setMaxBytesLocalDisk);
Optional.ofNullable(this.maxBytesLocalHeap).ifPresent(this.config::setMaxBytesLocalHeap);
Optional.ofNullable(this.maxBytesLocalOffHeap).ifPresent(this.config::setMaxBytesLocalOffHeap);
Optional.ofNullable(this.persistenceStrategy).ifPresent(
persistenceStrategy -> this.config.addPersistence(new PersistenceConfiguration().strategy(persistenceStrategy)));
Cache cache = new Cache(this.config);
cache.setName(name);
cache.setCacheManager(this.manager.getCacheManager());
if (!ArrayUtils.isEmpty(this.listeners)) {
RegisteredEventListeners registeredListeners = cache.getCacheEventNotificationService();
Stream.of(this.listeners).forEach(registeredListeners::registerListener);
}
cache.initialise();
return new CrigttCache(cache);
}
开发者ID:esacinc,项目名称:crigtt,代码行数:29,代码来源:CrigttCacheFactoryBean.java
示例3: getCacheEventNotificationService
import net.sf.ehcache.event.RegisteredEventListeners; //导入依赖的package包/类
@Override
public RegisteredEventListeners getCacheEventNotificationService() {
init();
return super.getCacheEventNotificationService();
}
开发者ID:lanimall,项目名称:ehcache-extensions,代码行数:6,代码来源:EhcacheDelegateAdapter.java
示例4: getObject
import net.sf.ehcache.event.RegisteredEventListeners; //导入依赖的package包/类
@Override
public EhCacheCache getObject() throws Exception {
String name = this.config.getName();
if (name == null) {
this.config.setName((name = this.beanName));
}
if (this.searchable != null) {
this.config.searchable(this.searchable);
}
if (this.hasMaxBytesLocalDisk()) {
this.config.setMaxBytesLocalDisk(this.maxBytesLocalDisk);
}
if (this.hasMaxBytesLocalHeap()) {
this.config.setMaxBytesLocalHeap(this.maxBytesLocalHeap);
}
if (this.hasMaxBytesLocalOffHeap()) {
this.config.setMaxBytesLocalOffHeap(this.maxBytesLocalOffHeap);
}
if (this.hasPersistenceStrategy()) {
this.config.addPersistence(new PersistenceConfiguration().strategy(persistenceStrategy));
}
if (this.hasSearchable()) {
this.config.searchable(this.searchable);
}
Cache cache = new Cache(this.config);
cache.setName(name);
if (this.hasListeners()) {
RegisteredEventListeners registeredListeners = cache.getCacheEventNotificationService();
Stream.of(this.listeners).forEach(registeredListeners::registerListener);
}
cache.setCacheManager(this.cacheManager.getCacheManager());
cache.initialise();
return new EhCacheCache(cache);
}
开发者ID:esacinc,项目名称:sdcct,代码行数:48,代码来源:CacheFactoryBean.java
示例5: register
import net.sf.ehcache.event.RegisteredEventListeners; //导入依赖的package包/类
@Override
public void register(CacheEventListener listener) {
//RegisteredEventListeners listeners=cache.getCacheEventNotificationService();
//listeners.registerListener(new ExpiresCacheEventListener());
net.sf.ehcache.Cache cache = getCache();
RegisteredEventListeners service = cache.getCacheEventNotificationService();
service.registerListener(new EHCacheEventListener(listener));
//.getCacheEventListeners().add(new EHCacheEventListener(listener));
}
开发者ID:lucee,项目名称:Lucee4,代码行数:14,代码来源:EHCacheSupport.java
注:本文中的net.sf.ehcache.event.RegisteredEventListeners类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论