• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java CacheRemove类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.cache.annotation.CacheRemove的典型用法代码示例。如果您正苦于以下问题:Java CacheRemove类的具体用法?Java CacheRemove怎么用?Java CacheRemove使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CacheRemove类属于javax.cache.annotation包,在下文中一共展示了CacheRemove类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: delete

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
/**
 * Delete a {@link SystemConfiguration}
 * 
 * @param name
 *            The configuration name to delete.
 */
@DELETE
@Path("{name}")
@CacheRemove(cacheName = "configuration")
public void delete(@CacheKey @PathParam("name") final String name) {
	repository.deleteAllBy("name", name);
}
 
开发者ID:ligoj,项目名称:bootstrap,代码行数:13,代码来源:ConfigurationResource.java


示例2: CacheRemoveOperation

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
public CacheRemoveOperation(
		CacheMethodDetails<CacheRemove> methodDetails, CacheResolver cacheResolver, KeyGenerator keyGenerator) {

	super(methodDetails, cacheResolver, keyGenerator);
	CacheRemove ann = methodDetails.getCacheAnnotation();
	this.exceptionTypeFilter = createExceptionTypeFilter(ann.evictFor(), ann.noEvictFor());
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:CacheRemoveOperation.java


示例3: findCacheOperation

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
protected JCacheOperation<?> findCacheOperation(Method method, Class<?> targetType) {
	CacheResult cacheResult = method.getAnnotation(CacheResult.class);
	CachePut cachePut = method.getAnnotation(CachePut.class);
	CacheRemove cacheRemove = method.getAnnotation(CacheRemove.class);
	CacheRemoveAll cacheRemoveAll = method.getAnnotation(CacheRemoveAll.class);

	int found = countNonNull(cacheResult, cachePut, cacheRemove, cacheRemoveAll);
	if (found == 0) {
		return null;
	}
	if (found > 1) {
		throw new IllegalStateException("More than one cache annotation found on '" + method + "'");
	}

	CacheDefaults defaults = getCacheDefaults(method, targetType);
	if (cacheResult != null) {
		return createCacheResultOperation(method, defaults, cacheResult);
	}
	else if (cachePut != null) {
		return createCachePutOperation(method, defaults, cachePut);
	}
	else if (cacheRemove != null) {
		return createCacheRemoveOperation(method, defaults, cacheRemove);
	}
	else {
		return createCacheRemoveAllOperation(method, defaults, cacheRemoveAll);
	}
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:30,代码来源:AnnotationJCacheOperationSource.java


示例4: createCacheRemoveOperation

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
protected CacheRemoveOperation createCacheRemoveOperation(Method method, CacheDefaults defaults, CacheRemove ann) {
	String cacheName = determineCacheName(method, defaults, ann.cacheName());
	CacheResolverFactory cacheResolverFactory =
			determineCacheResolverFactory(defaults, ann.cacheResolverFactory());
	KeyGenerator keyGenerator = determineKeyGenerator(defaults, ann.cacheKeyGenerator());

	CacheMethodDetails<CacheRemove> methodDetails = createMethodDetails(method, ann, cacheName);
	CacheResolver cacheResolver = getCacheResolver(cacheResolverFactory, methodDetails);
	return new CacheRemoveOperation(methodDetails, cacheResolver, keyGenerator);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:11,代码来源:AnnotationJCacheOperationSource.java


示例5: createSimpleOperation

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
protected CacheRemoveOperation createSimpleOperation() {
	CacheMethodDetails<CacheRemove> methodDetails = create(CacheRemove.class,
			SampleObject.class, "simpleRemove", Long.class);

	return new CacheRemoveOperation(methodDetails, defaultCacheResolver, defaultKeyGenerator);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:8,代码来源:CacheRemoveOperationTests.java


示例6: earlyRemove

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
@CacheRemove(afterInvocation = false)
public void earlyRemove(String id) {
	Object key = SimpleKeyGenerator.generateKey(id);
	Cache.ValueWrapper valueWrapper = defaultCache.get(key);
	if (valueWrapper != null) {
		throw new AssertionError("Value with key " + key + " expected to be already remove from cache");
	}
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:10,代码来源:AnnotatedJCacheableService.java


示例7: simpleRemove

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove(cacheName = "simpleCache")
public void simpleRemove(Long id) {
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:4,代码来源:SampleObject.java


示例8: multiAnnotations

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove
@CacheRemoveAll
public void multiAnnotations() {
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:5,代码来源:AnnotationCacheOperationSourceTests.java


示例9: evict

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove
public void evict(long id) {
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:4,代码来源:JCacheErrorHandlerTests.java


示例10: remove

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
@CacheRemove
public void remove(String id) {
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:5,代码来源:AnnotatedJCacheableService.java


示例11: removeWithException

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
@CacheRemove(noEvictFor = NullPointerException.class)
public void removeWithException(@CacheKey String id, boolean matchFilter) {
	throwException(matchFilter);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:6,代码来源:AnnotatedJCacheableService.java


示例12: earlyRemoveWithException

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
@CacheRemove(afterInvocation = false, evictFor = UnsupportedOperationException.class)
public void earlyRemoveWithException(@CacheKey String id, boolean matchFilter) {
	throwException(matchFilter);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:6,代码来源:AnnotatedJCacheableService.java


示例13: clear

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove
public void clear(@CacheKey String key) {
}
 
开发者ID:gitblit,项目名称:fathom,代码行数:4,代码来源:JCacheTest.java


示例14: updateDataset

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove(cacheName = "heavyComputation")
public void updateDataset(){
    LOG.info("updateDataset");
}
 
开发者ID:victorbuckservices,项目名称:workshop-spring-4.0-to-4.2,代码行数:5,代码来源:CacheableService.java


示例15: removeUser

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove(cacheName = "users")
public void removeUser(@CacheKey String name) {
    //...
}
 
开发者ID:kasunbg,项目名称:jcache-samples,代码行数:5,代码来源:UserManager.java


示例16: delete

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove
@Override
public void delete(@CacheKey Object parentKey, @CacheKey java.lang.String id) throws IOException {
  super.delete(parentKey, id);
}
 
开发者ID:Wadpam,项目名称:guja,代码行数:6,代码来源:GeneratedDFactoryDaoImpl.java


示例17: delete

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove
@Override
public void delete(@CacheKey Object parentKey, @CacheKey java.lang.Long id) throws IOException {
  super.delete(parentKey, id);
}
 
开发者ID:Wadpam,项目名称:guja,代码行数:6,代码来源:GeneratedDUserDaoImpl.java


示例18: removeBook

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
@CacheRemove
public boolean removeBook(Long id) {
	return delegate.removeBook(id);
}
 
开发者ID:snicoll,项目名称:scratches,代码行数:6,代码来源:JCacheBookRepository.java


示例19: deletePerson

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@CacheRemove
public void deletePerson(@CacheKey int id) {
	System.out.println("Removing");
	database.removeIf(p -> p.getId() == id);
}
 
开发者ID:wesleyegberto,项目名称:javaee_projects,代码行数:6,代码来源:PeopleManager.java


示例20: delete

import javax.cache.annotation.CacheRemove; //导入依赖的package包/类
@Override
@CacheRemove(cacheName = "conference" )
public void delete(final Long id) {
	entityManager.remove(entityManager.find(Conference.class, id));
	entityManager.flush();
}
 
开发者ID:hantsy,项目名称:spring4-sandbox,代码行数:7,代码来源:JpaConferenceRepositoryImpl.java



注:本文中的javax.cache.annotation.CacheRemove类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DefaultFieldFactory类代码示例发布时间:2022-05-22
下一篇:
Java QueueState类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap