public int size() { try { return cache.getSize(); } catch (Throwable t) { throw new CacheException(t); } }
/** * {@inheritDoc} */ public int getSize() throws IllegalStateException, CacheException { return underlyingCache.getSize(); }
/** * {@inheritDoc} */ public int getSize() throws IllegalStateException, CacheException { // THIS IS GENERATED CODE -- DO NOT HAND MODIFY! Thread t = Thread.currentThread(); ClassLoader prev = t.getContextClassLoader(); t.setContextClassLoader(this.classLoader); try { return this.cache.getSize(); } finally { t.setContextClassLoader(prev); } }
/** * @return the number of elements in ehcache's MemoryStore */ public final long getElementCountInMemory() { try { return cache.getSize(); } catch (net.sf.ehcache.CacheException ce) { throw new CacheException(ce); } }
/** * {@inheritDoc} */ public long getElementCountInMemory() { try { return cache.getSize(); } catch (net.sf.ehcache.CacheException ce) { if (ce instanceof NonStopCacheException) { HibernateNonstopCacheExceptionHandler.getInstance().handleNonstopCacheException((NonStopCacheException) ce); return -1; } else { throw new CacheException(ce); } } }
/** * {@inheritDoc} */ public int getSize() { return cache.getSize(); }
/** * {@inheritDoc} */ public int getSize() throws IllegalStateException, CacheException { return underlyingCache.getSize(); }
/** * {@inheritDoc} */ public int getSize() throws IllegalStateException, CacheException { return underlyingCache.getSize(); }
/** * {@inheritDoc} */ public int getSize() throws IllegalStateException, CacheException { return underlyingCache.getSize(); }
/** * {@inheritDoc} */ @Override public int getSize() { return cache.getSize(); }
@Override public boolean isEmpty() { return this.cache.getSize() > 0; }
/** * @return the number of elements in ehcache's MemoryStore */ public final long getElementCountInMemory() { try { return cache.getSize(); } catch (net.sf.ehcache.CacheException ce) { throw new CacheException(ce); } }
@ManagedOperation() @Override public int size() { return cache.getSize(); }
public int size() { try { return cache.getSize(); } catch (Throwable t) { throw new CacheException(t); } }
@ManagedOperation() @Override public int size() { return cache.getSize(); }
@Override public long deleteAll() { return ticketCatalog.findAll().stream() .map(this::getTicketCacheFor) .filter(Objects::nonNull) .mapToLong(instance -> { val size = instance.getSize(); instance.removeAll(); return size; }).sum(); }
@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"); }
@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"); }
/** * {@inheritDoc} */ public int getSize() { try { return this.getCache().getSize(); } catch (Throwable t) { throw new CacheException(t); } }
@RestMethod(required = { PARAM_CACHE }) public void getCacheElementCount(RestRequest request, RestResponse response) throws IOException { String cacheName = request.getParameter(PARAM_CACHE); Ehcache cache = cacheManager.getEhcache(cacheName); if (cache != null) { response.value(cache.getSize()); } }