net.sf.ehcache.Ehcache.getMemoryStoreSize()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(282)

本文整理了Java中net.sf.ehcache.Ehcache.getMemoryStoreSize()方法的一些代码示例,展示了Ehcache.getMemoryStoreSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ehcache.getMemoryStoreSize()方法的具体详情如下:
包路径:net.sf.ehcache.Ehcache
类名称:Ehcache
方法名:getMemoryStoreSize

Ehcache.getMemoryStoreSize介绍

[英]Returns the number of elements in the memory store.
[中]

代码示例

代码示例来源:origin: apache/shiro

/**
 * Returns the size (in bytes) that this EhCache's memory store is using (RAM), or <code>-1</code> if
 * that number is unknown or cannot be calculated.
 *
 * @return the size (in bytes) that this EhCache's memory store is using (RAM), or <code>-1</code> if
 *         that number is unknown or cannot be calculated.
 */
public long getMemoryStoreSize() {
  try {
    return cache.getMemoryStoreSize();
  }
  catch (Throwable t) {
    throw new CacheException(t);
  }
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * {@inheritDoc}
 */
@Deprecated public long getMemoryStoreSize() throws IllegalStateException {
  return underlyingCache.getMemoryStoreSize();
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
* {@inheritDoc}
*/
@Deprecated public long getMemoryStoreSize() throws IllegalStateException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    return this.cache.getMemoryStoreSize();
  } finally {
    t.setContextClassLoader(prev);
  }
}

代码示例来源:origin: javamelody/javamelody

this.inMemoryObjectCount = cache.getMemoryStoreSize();
this.onDiskObjectCount = cache.getDiskStoreSize();

代码示例来源:origin: net.sf.ehcache/ehcache-explicitlocking

/**
 * Returns the number of elements in the memory store.
 * 
 * @return the number of elements in the memory store
 * @throws IllegalStateException
 *             if the cache is not {@link net.sf.ehcache.Status#STATUS_ALIVE}
 */
public long getMemoryStoreSize() throws IllegalStateException {
  return cache.getMemoryStoreSize();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * {@inheritDoc}
 */
public long getMemoryStoreSize() throws IllegalStateException {
  return underlyingCache.getMemoryStoreSize();
}

代码示例来源:origin: org.terracotta/ehcache-probe

public Long call() throws Exception {
    return cache.getMemoryStoreSize();
  }
}));

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * {@inheritDoc}
 */
public long getLocalHeapSize() {
  if (!statisticsEnabled.get()) {
    return 0;
  }
  return cache.getMemoryStoreSize();
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * {@inheritDoc}
 */
@Deprecated public long getMemoryStoreSize() throws IllegalStateException {
  return underlyingCache.getMemoryStoreSize();
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * {@inheritDoc}
 */
@Deprecated public long getMemoryStoreSize() throws IllegalStateException {
  return underlyingCache.getMemoryStoreSize();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
* {@inheritDoc}
*/
public long getMemoryStoreSize() throws IllegalStateException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    return this.cache.getMemoryStoreSize();
  } finally {
    t.setContextClassLoader(prev);
  }
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
* {@inheritDoc}
*/
@Deprecated public long getMemoryStoreSize() throws IllegalStateException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    return this.cache.getMemoryStoreSize();
  } finally {
    t.setContextClassLoader(prev);
  }
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
* {@inheritDoc}
*/
@Deprecated public long getMemoryStoreSize() throws IllegalStateException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    return this.cache.getMemoryStoreSize();
  } finally {
    t.setContextClassLoader(prev);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * @return the number of elements in ehcache's MemoryStore
 */
public final long getElementCountInMemory() {
  try {
    return cache.getMemoryStoreSize();
  } catch (net.sf.ehcache.CacheException ce) {
    throw new CacheException(ce);
  }
}

代码示例来源:origin: org.terracotta/ehcache-probe

public Long call() throws Exception {
  return cache.getMemoryStoreSize() * getAdjustedSample();
}

代码示例来源:origin: com.madgag/mini-git-server-server

public long getMemoryStoreSize() throws IllegalStateException {
 return self().getMemoryStoreSize();
}

代码示例来源:origin: rtyley/mini-git-server

public long getMemoryStoreSize() throws IllegalStateException {
 return self().getMemoryStoreSize();
}

代码示例来源:origin: org.apache.shiro/shiro-ehcache

/**
 * Returns the size (in bytes) that this EhCache's memory store is using (RAM), or <code>-1</code> if
 * that number is unknown or cannot be calculated.
 *
 * @return the size (in bytes) that this EhCache's memory store is using (RAM), or <code>-1</code> if
 *         that number is unknown or cannot be calculated.
 */
public long getMemoryStoreSize() {
  try {
    return cache.getMemoryStoreSize();
  }
  catch (Throwable t) {
    throw new CacheException(t);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * {@inheritDoc}
 */
public long getElementCountInMemory() {
  try {
    return cache.getMemoryStoreSize();
  } catch (net.sf.ehcache.CacheException ce) {
    if (ce instanceof NonStopCacheException) {
      HibernateNonstopCacheExceptionHandler.getInstance().handleNonstopCacheException((NonStopCacheException) ce);
      return -1;
    } else {
      throw new CacheException(ce);
    }
  }
}

代码示例来源:origin: org.terracotta/ehcache-probe

@RestMethod(required = { PARAM_CACHE })
public void getCacheElementCountMemory(RestRequest request,
    RestResponse response) throws IOException {
  String cacheName = request.getParameter(PARAM_CACHE);
  Ehcache cache = cacheManager.getEhcache(cacheName);
  if (cache != null) {
    response.value(cache.getMemoryStoreSize());
  }
}

相关文章

Ehcache类方法