Java Code Examples for net.sf.ehcache.Ehcache#getSize()

The following examples show how to use net.sf.ehcache.Ehcache#getSize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CacheManagerWrapper.java    From cms with Apache License 2.0 5 votes vote down vote up
@Override
public int size() {
	if (springCache.getNativeCache() instanceof Ehcache) {
		Ehcache ehcache = (Ehcache) springCache.getNativeCache();
		return ehcache.getSize();
	}
	throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}
 
Example 2
Source File: SpringCacheManagerWrapper.java    From PhrackCTF-Platform-Team with Apache License 2.0 5 votes vote down vote up
public int size() {
    if(springCache.getNativeCache() instanceof Ehcache) {
        Ehcache ehcache = (Ehcache) springCache.getNativeCache();
        return ehcache.getSize();
    }
    throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}
 
Example 3
Source File: SpringCacheManagerWrapper.java    From roncoo-pay with Apache License 2.0 5 votes vote down vote up
@Override
public int size() {
	if (springCache.getNativeCache() instanceof Ehcache) {
		Ehcache ehcache = (Ehcache) springCache.getNativeCache();
		return ehcache.getSize();
	}
	throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}
 
Example 4
Source File: SpringCacheManagerWrapper.java    From PhrackCTF-Platform-Personal with Apache License 2.0 5 votes vote down vote up
public int size() {
    if(springCache.getNativeCache() instanceof Ehcache) {
        Ehcache ehcache = (Ehcache) springCache.getNativeCache();
        return ehcache.getSize();
    }
    throw new UnsupportedOperationException("invoke spring cache abstract size method not supported");
}
 
Example 5
Source File: MultiMarkupEhCacheProvider.java    From yes-cart with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public int size() {
    final Ehcache ehcache = (Ehcache) CACHE.getNativeCache();
    return ehcache.getSize();
}