本文整理汇总了Java中javax.cache.configuration.OptionalFeature类的典型用法代码示例。如果您正苦于以下问题:Java OptionalFeature类的具体用法?Java OptionalFeature怎么用?Java OptionalFeature使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OptionalFeature类属于javax.cache.configuration包,在下文中一共展示了OptionalFeature类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean isSupported(final OptionalFeature optionalFeature) {
if (optionalFeature == null) {
throw new NullPointerException();
}
// this switch statement written w/o "default:" to let use know if a new
// optional feature is added in the spec
switch (optionalFeature) {
case STORE_BY_REFERENCE:
return true;
}
throw new IllegalArgumentException("Unknown OptionalFeature: " + optionalFeature.name());
}
示例2: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature optionalFeature)
{
if (optionalFeature == OptionalFeature.STORE_BY_REFERENCE)
return true;
// Unknown / new feature => not supported
return false;
}
示例3: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature optionalFeature) {
switch (optionalFeature) {
case STORE_BY_REFERENCE:
return true;
}
return false;
}
示例4: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature optionalFeature) {
switch (optionalFeature) {
case STORE_BY_REFERENCE:
return false;
default:
return false;
}
}
示例5: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Test
public void isSupported() {
CachingProvider provider = Caching.getCachingProvider();
OptionalFeature[] features = OptionalFeature.values();
for (OptionalFeature feature : features) {
boolean value = provider.isSupported(feature);
Logger.getLogger(getClass().getName()).info("Optional feature " + feature + " supported=" + value);
}
}
示例6: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature optionalFeature) {
// TODO implement support of store_by_reference
return false;
}
示例7: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
public boolean isSupported(OptionalFeature optionalFeature) {
return false;
}
示例8: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature optionalFeature)
{
return optionalFeature.equals(OptionalFeature.STORE_BY_REFERENCE);
}
示例9: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature optionalFeature) {
return false;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:MockCachingProvider.java
示例10: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature optionalFeature) {
if(optionalFeature == optionalFeature.STORE_BY_REFERENCE)
return true;
return false;
}
示例11: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
/** {@inheritDoc} */
@Override public boolean isSupported(OptionalFeature optionalFeature) {
return false;
}
示例12: isExcluded
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
/**
* @see org.jsr107.tck.testutil.ExcludeListExcluder#isExcluded(String)
*/
@Override
protected boolean isExcluded(String methodName) {
return "simpleAPINoGenericsAndNoTypeEnforcementStoreByReference".equals(methodName) && !cacheManager.getCachingProvider().isSupported(OptionalFeature.STORE_BY_REFERENCE) || super.isExcluded(methodName);
}
示例13: isSupported
import javax.cache.configuration.OptionalFeature; //导入依赖的package包/类
@Override
public boolean isSupported(OptionalFeature v) {
if (v == OptionalFeature.STORE_BY_REFERENCE) { return true; }
return false;
}