Top Description Methods
net.sf.ehcache.terracotta

public Interface InternalEhcache

extends Ehcache
Known Direct Implementers
net.sf.ehcache.Cache, net.sf.ehcache.constructs.EhcacheDecoratorAdapter, net.sf.ehcache.constructs.classloader.InternalClassLoaderAwareCache
Imports
net.sf.ehcache.Ehcache, .Element, .Status

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

Modifier and TypeMethod and Description
public void
recalculateSize(Object
the key
key
)

Recalculate the size of the element mapped to the key

public Element

Returns:

element the removed element associated with the key, null if no mapping exists
removeAndReturnElement
(Object
the key of the element to operate on
key
)

Removes and returns the element associated with the key

Inherited from net.sf.ehcache.Ehcache:
acquireReadLockOnKeyacquireWriteLockOnKeyaddPropertyChangeListenerbootstrapcalculateInMemorySizecalculateOffHeapSizecalculateOnDiskSizeclonecreateQuerydisableDynamicFeaturesdisposeevictExpiredElementsflushgetgetgetAllgetAllWithLoadergetBootstrapCacheLoadergetCacheConfigurationgetCacheEventNotificationServicegetCacheExceptionHandlergetCacheManagergetDiskStoreSizegetGuidgetInternalContextgetKeysgetKeysNoDuplicateCheckgetKeysWithExpiryCheckgetMemoryStoreSizegetNamegetOffHeapStoreSizegetQuietgetQuietgetRegisteredCacheExtensionsgetRegisteredCacheLoadersgetRegisteredCacheWritergetSearchAttributegetSearchAttributesgetSizegetStatisticsgetStatusgetWithLoadergetWriterManagerhasAbortedSizeOfinitialiseisClusterBulkLoadEnabledisClusterCoherentisDisabledisElementInMemoryisElementInMemoryisElementOnDiskisElementOnDiskisExpiredisKeyInCacheisNodeBulkLoadEnabledisNodeCoherentisReadLockedByCurrentThreadisSearchableisValueInCacheisWriteLockedByCurrentThreadloadloadAllputputputAllputIfAbsentputIfAbsentputQuietputWithWriterregisterCacheExtensionregisterCacheLoaderregisterCacheWriterregisterDynamicAttributesExtractorreleaseReadLockOnKeyreleaseWriteLockOnKeyremoveremoveremoveremoveremoveAllremoveAllremoveAllremoveAllremoveElementremovePropertyChangeListenerremoveQuietremoveQuietremoveWithWriterreplacereplacesetBootstrapCacheLoadersetCacheExceptionHandlersetCacheManagersetDisabledsetNamesetNodeBulkLoadEnabledsetNodeCoherentsetTransactionManagerLookuptoStringtryReadLockOnKeytryWriteLockOnKeyunregisterCacheExtensionunregisterCacheLoaderunregisterCacheWriterwaitUntilClusterBulkLoadCompletewaitUntilClusterCoherent

Method Detail

recalculateSizeback to summary
public void recalculateSize(Object key)

Recalculate the size of the element mapped to the key

Parameters
key:Object

the key

removeAndReturnElementback to summary
public Element removeAndReturnElement(Object key) throws IllegalStateException

Removes and returns the element associated with the key

Parameters
key:Object

the key of the element to operate on

Returns:Element

element the removed element associated with the key, null if no mapping exists

Exceptions
IllegalStateException:
if the cache is not Status#STATUS_ALIVE