ehcache

net.sf.ehcache.terracotta
Interface InternalEhcache

All Superinterfaces:
Cloneable, Ehcache
All Known Implementing Classes:
BlockingCache, Cache, EhcacheDecoratorAdapter, InternalClassLoaderAwareCache, ReadThroughCache, RefreshAheadCache, SelfPopulatingCache, StronglyConsistentCacheAccessor, UpdatingSelfPopulatingCache

public interface InternalEhcache
extends Ehcache

This is an extension of the Ehcache interface to allow addition of new methods to Cache without breaking the public contract. The Cache class implements InternalEhcache interface, which in turn extends the Ehcache interface.

Author:
dkumar

Method Summary
 void recalculateSize(Object key)
          Recalculate the size of the element mapped to the key
 Element removeAndReturnElement(Object key)
          Removes and returns the element associated with the key
 
Methods inherited from interface net.sf.ehcache.Ehcache
acquireReadLockOnKey, acquireWriteLockOnKey, addPropertyChangeListener, bootstrap, calculateInMemorySize, calculateOffHeapSize, calculateOnDiskSize, clone, createQuery, disableDynamicFeatures, dispose, evictExpiredElements, flush, get, get, getAll, getAllWithLoader, getBootstrapCacheLoader, getCacheConfiguration, getCacheEventNotificationService, getCacheExceptionHandler, getCacheManager, getDiskStoreSize, getGuid, getInternalContext, getKeys, getKeysNoDuplicateCheck, getKeysWithExpiryCheck, getMemoryStoreSize, getName, getOffHeapStoreSize, getQuiet, getQuiet, getRegisteredCacheExtensions, getRegisteredCacheLoaders, getRegisteredCacheWriter, getSearchAttribute, getSearchAttributes, getSize, getStatistics, getStatus, getWithLoader, getWriterManager, hasAbortedSizeOf, initialise, isClusterBulkLoadEnabled, isClusterCoherent, isDisabled, isElementInMemory, isElementInMemory, isElementOnDisk, isElementOnDisk, isExpired, isKeyInCache, isNodeBulkLoadEnabled, isNodeCoherent, isReadLockedByCurrentThread, isSearchable, isValueInCache, isWriteLockedByCurrentThread, load, loadAll, put, put, putAll, putIfAbsent, putIfAbsent, putQuiet, putWithWriter, registerCacheExtension, registerCacheLoader, registerCacheWriter, registerDynamicAttributesExtractor, releaseReadLockOnKey, releaseWriteLockOnKey, remove, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeElement, removePropertyChangeListener, removeQuiet, removeQuiet, removeWithWriter, replace, replace, setBootstrapCacheLoader, setCacheExceptionHandler, setCacheManager, setDisabled, setName, setNodeBulkLoadEnabled, setNodeCoherent, setTransactionManagerLookup, toString, tryReadLockOnKey, tryWriteLockOnKey, unregisterCacheExtension, unregisterCacheLoader, unregisterCacheWriter, waitUntilClusterBulkLoadComplete, waitUntilClusterCoherent
 

Method Detail

removeAndReturnElement

Element removeAndReturnElement(Object key)
                               throws IllegalStateException
Removes and returns the element associated with the key

Parameters:
key - the key of the element to operate on
Returns:
element the removed element associated with the key, null if no mapping exists
Throws:
IllegalStateException

recalculateSize

void recalculateSize(Object key)
Recalculate the size of the element mapped to the key

Parameters:
key - the key

ehcache

Copyright 2001-2015, Terracotta, Inc.