本文整理了Java中net.sf.ehcache.Cache.isTerracottaClustered()
方法的一些代码示例,展示了Cache.isTerracottaClustered()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.isTerracottaClustered()
方法的具体详情如下:
包路径:net.sf.ehcache.Cache
类名称:Cache
方法名:isTerracottaClustered
[英]Indicates whether this cache is clustered by Terracotta
[中]指示此缓存是否由Terracotta群集
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public int getRegionCacheOrphanEvictionPeriod(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod();
} else {
return -1;
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*/
public boolean isRegionCacheOrphanEvictionEnabled(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEviction();
} else {
return false;
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Returns the number of elements in the disk store.
*
* @return the number of elements in the disk store.
* @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE}
*/
@Deprecated public final int getDiskStoreSize() throws IllegalStateException {
checkStatus();
if (isTerracottaClustered()) {
return (int) getStatistics().getRemoteSize();
} else {
return (int) getStatistics().getLocalDiskSize();
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
checkStatus();
if (isTerracottaClustered()) {
return compoundStore.getTerracottaClusteredSize();
} else {
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Create using the given cache.
*
* @param cache cache
*/
public WriteBehindManager(final Cache cache, final Store store) {
if (cache.isTerracottaClustered()) {
writeBehind = ((TerracottaStore)store).createWriteBehind();
} else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null
&& cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) {
writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache);
} else {
writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration());
}
}
代码示例来源:origin: net.sf.ehcache/ehcache
if (cacheStatus.isAlive() && isTerracottaClustered()) {
getCacheManager().getClusteredInstanceFactory().unlinkCache(getName());
代码示例来源:origin: net.sf.ehcache/ehcache
if (isTerracottaClustered()) {
checkClusteredConfig();
int maxConcurrency = Integer.getInteger(EHCACHE_CLUSTERREDSTORE_MAX_CONCURRENCY_PROP,
if (!isTerracottaClustered() && isSearchable()) {
Map<String, AttributeExtractor> extractors = new HashMap<String, AttributeExtractor>();
for (SearchAttribute sa : configuration.getSearchAttributes().values()) {
if (!isTerracottaClustered()) {
compoundStore.addStoreListener(this);
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public int getRegionCacheOrphanEvictionPeriod(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod();
} else {
return -1;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public int getRegionCacheOrphanEvictionPeriod(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod();
} else {
return -1;
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean isRegionCacheOrphanEvictionEnabled(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEviction();
} else {
return false;
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public int getRegionCacheOrphanEvictionPeriod(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEvictionPeriod();
} else {
return -1;
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* {@inheritDoc}
*/
public boolean isRegionCacheOrphanEvictionEnabled(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEviction();
} else {
return false;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* {@inheritDoc}
*/
public boolean isRegionCacheOrphanEvictionEnabled(String region) {
Cache cache = this.cacheManager.getCache(region);
if (cache != null && cache.isTerracottaClustered()) {
return cache.getCacheConfiguration().getTerracottaConfiguration().getOrphanEviction();
} else {
return false;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* Returns the number of elements in the disk store.
*
* @return the number of elements in the disk store.
* @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE}
*/
public final int getDiskStoreSize() throws IllegalStateException {
checkStatus();
if (isTerracottaClustered()) {
return compoundStore.getTerracottaClusteredSize();
} else {
return compoundStore.getOnDiskSize();
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* Returns the number of elements in the disk store.
*
* @return the number of elements in the disk store.
* @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE}
*/
@Deprecated public final int getDiskStoreSize() throws IllegalStateException {
checkStatus();
if (isTerracottaClustered()) {
return (int) getStatistics().getRemoteSize();
} else {
return (int) getStatistics().getLocalDiskSize();
}
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* Returns the number of elements in the disk store.
*
* @return the number of elements in the disk store.
* @throws IllegalStateException if the cache is not {@link Status#STATUS_ALIVE}
*/
@Deprecated public final int getDiskStoreSize() throws IllegalStateException {
checkStatus();
if (isTerracottaClustered()) {
return (int) getStatistics().getRemoteSize();
} else {
return (int) getStatistics().getLocalDiskSize();
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
checkStatus();
if (isTerracottaClustered()) {
return compoundStore.getTerracottaClusteredSize();
} else {
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* Create using the given cache.
*
* @param cache cache
*/
public WriteBehindManager(final Cache cache, final Store store) {
if (cache.isTerracottaClustered()) {
writeBehind = ((TerracottaStore)store).createWriteBehind();
} else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null
&& cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) {
writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache);
} else {
writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration());
}
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* Create using the given cache.
*
* @param cache cache
*/
public WriteBehindManager(final Cache cache, final Store store) {
if (cache.isTerracottaClustered()) {
writeBehind = ((TerracottaStore)store).createWriteBehind();
} else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null
&& cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) {
writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache);
} else {
writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration());
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache
/**
* Create using the given cache.
*
* @param cache cache
*/
public WriteBehindManager(final Cache cache) {
if (cache.isTerracottaClustered()) {
writeBehind = cache.getCacheManager().createTerracottaWriteBehind(cache);
} else if (cache.getCacheConfiguration().getPersistenceConfiguration() != null &&
cache.getCacheConfiguration().getPersistenceConfiguration().getStrategy() == Strategy.LOCALRESTARTABLE) {
writeBehind = cache.getCacheManager().getFeaturesManager().createWriteBehind(cache);
} else {
writeBehind = new WriteBehindQueueManager(cache.getCacheConfiguration());
}
}
内容来源于网络,如有侵权,请联系作者删除!