Package | Description |
---|---|
net.sf.ehcache |
This package contains the public API for using ehcache.
|
net.sf.ehcache.config |
This package contains the cache configuration code.
|
net.sf.ehcache.config.generator |
This package contains utility classes for generating configuration texts.
|
net.sf.ehcache.config.generator.model.elements |
This package contains utility classes encapsulating ideas of Elements and Attributes from the ehcache.xsd
|
net.sf.ehcache.constructs |
The constructs package builds on top of the core ehcache classes to create
implementations for common caching patterns.
|
net.sf.ehcache.constructs.classloader |
ClassLoader contstructs package
|
net.sf.ehcache.management.sampled |
This package contains classes related to MBeans with Sampled Statistics.
|
net.sf.ehcache.store |
Store package.
|
net.sf.ehcache.store.disk |
This package contains the disk store.
|
net.sf.ehcache.terracotta |
This package contains the Terracotta integration functionalities.
|
net.sf.ehcache.writer.writebehind |
This package contains the write behind functionalities.
|
Modifier and Type | Method and Description |
---|---|
CacheConfiguration |
Ehcache.getCacheConfiguration()
Gets the cache configuration this cache was created with.
|
CacheConfiguration |
Cache.getCacheConfiguration()
Gets the cache configuration this cache was created with.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Element.isExpired(CacheConfiguration config)
An element is expired if the expiration time as given by
Element.getExpirationTime() is in the past. |
Constructor and Description |
---|
Cache(CacheConfiguration cacheConfiguration)
2.0 and higher Constructor
The
ConfigurationFactory and clients can create these. |
Cache(CacheConfiguration cacheConfiguration,
RegisteredEventListeners registeredEventListeners,
BootstrapCacheLoader bootstrapCacheLoader)
2.0 and higher Constructor
The
ConfigurationFactory
and clients can create these. |
Modifier and Type | Method and Description |
---|---|
CacheConfiguration |
CacheConfiguration.bootstrapCacheLoaderFactory(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factory) |
CacheConfiguration |
CacheConfiguration.cacheEventListenerFactory(CacheConfiguration.CacheEventListenerFactoryConfiguration factory) |
CacheConfiguration |
CacheConfiguration.cacheExceptionHandlerFactory(CacheConfiguration.CacheExceptionHandlerFactoryConfiguration factory) |
CacheConfiguration |
CacheConfiguration.cacheExtensionFactory(CacheConfiguration.CacheExtensionFactoryConfiguration factory) |
CacheConfiguration |
CacheConfiguration.cacheLoaderFactory(CacheConfiguration.CacheLoaderFactoryConfiguration factory) |
CacheConfiguration |
CacheConfiguration.cacheWriter(CacheWriterConfiguration cacheWriterConfiguration) |
CacheConfiguration |
CacheConfiguration.clearOnFlush(boolean clearOnFlush)
Builder which sets whether the MemoryStore should be cleared when
flush() is called on the cache - true by default. |
CacheConfiguration |
CacheConfiguration.clone()
Clones this object, following the usual contract.
|
CacheConfiguration |
CacheConfiguration.copyOnRead(boolean copyOnRead)
Whether the Cache should copy elements it returns
|
CacheConfiguration |
CacheConfiguration.copyOnWrite(boolean copyOnWrite)
Whether the Cache should copy elements it gets
|
CacheConfiguration |
CacheConfiguration.diskAccessStripes(int stripes)
Builder which sets the number of disk stripes.
|
CacheConfiguration |
CacheConfiguration.diskExpiryThreadIntervalSeconds(long diskExpiryThreadIntervalSeconds)
Builder which sets the interval in seconds between runs of the disk expiry thread.
|
CacheConfiguration |
CacheConfiguration.diskPersistent(boolean diskPersistent)
Deprecated.
The
diskPersistent attribute has been replaced with persistence(PersistenceConfiguration) . |
CacheConfiguration |
CacheConfiguration.diskSpoolBufferSizeMB(int diskSpoolBufferSizeMB)
Builder which sets the disk spool size, which is used to buffer writes to the DiskStore.
|
CacheConfiguration |
CacheConfiguration.eternal(boolean eternal)
Builder which sets whether elements are eternal.
|
CacheConfiguration |
Configuration.getDefaultCacheConfiguration() |
CacheConfiguration |
CacheConfiguration.logging(boolean enable)
Builder to enable or disable logging for the cache
This property can be modified dynamically while the cache is operating.
|
CacheConfiguration |
CacheConfiguration.maxBytesLocalDisk(long amount,
MemoryUnit memoryUnit)
Sets the maxOnDisk size
|
CacheConfiguration |
CacheConfiguration.maxBytesLocalHeap(long amount,
MemoryUnit memoryUnit)
Sets the maxOnHeap size
|
CacheConfiguration |
CacheConfiguration.maxBytesLocalOffHeap(long amount,
MemoryUnit memoryUnit)
Sets the maxOffHeap tier size
|
CacheConfiguration |
CacheConfiguration.maxElementsInMemory(int maxElementsInMemory)
Deprecated.
|
CacheConfiguration |
CacheConfiguration.maxElementsOnDisk(int maxElementsOnDisk)
Builder which sets the maximum number elements on Disk.
|
CacheConfiguration |
CacheConfiguration.maxEntriesLocalDisk(int maxElementsOnDisk)
Builder which sets the maximum number elements on Disk.
|
CacheConfiguration |
CacheConfiguration.maxEntriesLocalHeap(int maxElementsInMemory)
Builder that sets the maximum objects to be held in memory (0 = no limit).
|
CacheConfiguration |
CacheConfiguration.maxMemoryOffHeap(String maxMemoryOffHeap)
Builder to set the max off heap memory size allocated for this cache.
|
CacheConfiguration |
CacheConfiguration.memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy memoryStoreEvictionPolicy)
Builder which Sets the eviction policy.
|
CacheConfiguration |
CacheConfiguration.memoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
Builder that sets the eviction policy.
|
CacheConfiguration |
CacheConfiguration.name(String name)
Builder to set the name of the cache.
|
CacheConfiguration |
CacheConfiguration.overflowToDisk(boolean overflowToDisk)
Deprecated.
The
overflowToDisk attribute has been replaced with PersistenceConfiguration.Strategy.LOCALTEMPSWAP . |
CacheConfiguration |
CacheConfiguration.overflowToOffHeap(boolean overflowToOffHeap)
Builder to enable or disable offheap store for the cache.
|
static CacheConfiguration |
ConfigurationFactory.parseCacheConfiguration(String xmlString)
Configures a cache bean from a string of XML.
|
CacheConfiguration |
CacheConfiguration.persistence(PersistenceConfiguration persistenceConfiguration)
Builder to set the PersistenceConfiguration for this cache.
|
CacheConfiguration |
CacheConfiguration.pinning(PinningConfiguration pinningConfiguration) |
CacheConfiguration |
CacheConfiguration.searchable(Searchable searchable) |
CacheConfiguration |
CacheConfiguration.sizeOfPolicy(SizeOfPolicyConfiguration sizeOfPolicyConfiguration)
Builder to set the SizeOfPolicyConfiguration for this cache.
|
CacheConfiguration |
CacheConfiguration.statistics(boolean statistics)
Builder which sets whether the cache's statistics are enabled.
|
CacheConfiguration |
CacheConfiguration.terracotta(TerracottaConfiguration terracottaConfiguration) |
CacheConfiguration |
CacheConfiguration.timeoutMillis(long timeoutMillis)
Builder that sets the timeout for CacheLoader execution (0 = no timeout).
|
CacheConfiguration |
CacheConfiguration.timeToIdleSeconds(long timeToIdleSeconds)
Builder which sets the time to idle for an element before it expires.
|
CacheConfiguration |
CacheConfiguration.timeToLiveSeconds(long timeToLiveSeconds)
Builder which sets the time to idle for an element before it expires.
|
CacheConfiguration |
CacheConfiguration.transactionalMode(CacheConfiguration.TransactionalMode transactionalMode)
Builder which sets the transactionalMode
|
CacheConfiguration |
CacheConfiguration.transactionalMode(String transactionalMode)
Builder which sets the transactionalMode
|
Modifier and Type | Method and Description |
---|---|
Map<String,CacheConfiguration> |
Configuration.getCacheConfigurations()
Gets a Map of cache configurations, keyed by name.
|
Modifier and Type | Method and Description |
---|---|
void |
Configuration.addCache(CacheConfiguration cacheConfiguration)
Allows BeanHandler to add Cache Configurations to the configuration.
|
void |
Configuration.addDefaultCache(CacheConfiguration defaultCacheConfiguration)
Allows BeanHandler to add a default configuration to the configuration.
|
Configuration |
Configuration.cache(CacheConfiguration cacheConfiguration)
Builder to add a new cache through its config
|
static List<Ehcache> |
ConfigurationHelper.createDefaultCacheDecorators(Ehcache cache,
CacheConfiguration defaultCacheConfiguration)
Creates default cache decorators specified in the default cache configuration if any
|
Configuration |
Configuration.defaultCache(CacheConfiguration defaultCacheConfiguration)
Builder method to set the default cache configuration, this can only be used once.
|
void |
CacheConfigurationListener.deregistered(CacheConfiguration config)
Indicates that this listener was removed from the given configuration
|
ElementValueComparator |
ElementValueComparatorConfiguration.getElementComparatorInstance(CacheConfiguration cacheConfiguration)
Get (and potentially) instantiate the instance
|
void |
CacheConfigurationListener.registered(CacheConfiguration config)
Indicates that this listener was registered with the given configuration
|
void |
Configuration.RuntimeCfg.removeCache(CacheConfiguration cacheConfiguration)
Removes a cache from the known list
|
void |
Configuration.setDefaultCacheConfiguration(CacheConfiguration defaultCacheConfiguration) |
Modifier and Type | Method and Description |
---|---|
String |
ConfigurationGenerator.generate(Configuration configuration,
CacheConfiguration cacheConfiguration)
Deprecated.
use appropriate methods in
ConfigurationUtil instead |
String |
ConfigurationGenerator.generate(Configuration configuration,
CacheConfiguration defaultCacheConfiguration,
Map<String,CacheConfiguration> cacheConfigs)
Deprecated.
use appropriate methods in
ConfigurationUtil instead |
static String |
ConfigurationUtil.generateCacheConfigurationText(Configuration configuration,
CacheConfiguration cacheConfiguration)
Generates configuration text for a
CacheConfiguration |
Modifier and Type | Method and Description |
---|---|
String |
ConfigurationGenerator.generate(Configuration configuration,
CacheConfiguration defaultCacheConfiguration,
Map<String,CacheConfiguration> cacheConfigs)
Deprecated.
use appropriate methods in
ConfigurationUtil instead |
Modifier and Type | Method and Description |
---|---|
static void |
CacheConfigurationElement.addCommonAttributesWithDefaultCache(NodeElement element,
Configuration configuration,
CacheConfiguration cacheConfiguration)
Adds all attributes which are common with the "defaultCache" element in ehcache.xsd
|
static void |
CacheConfigurationElement.addCommonChildElementsWithDefaultCache(NodeElement element,
CacheConfiguration cacheConfiguration)
Adds all common child elements with the "defaultCache" element in ehcache.xsd
|
Constructor and Description |
---|
CacheConfigurationElement(NodeElement parent,
Configuration configuration,
CacheConfiguration cacheConfiguration)
Constructor accepting the parent and the
CacheConfiguration |
DefaultCacheConfigurationElement(NodeElement parent,
Configuration configuration,
CacheConfiguration cacheConfiguration)
Constructor accepting the parent and the
CacheConfiguration |
Modifier and Type | Method and Description |
---|---|
CacheConfiguration |
EhcacheDecoratorAdapter.getCacheConfiguration()
Gets the cache configuration this cache was created with.
|
Modifier and Type | Method and Description |
---|---|
CacheConfiguration |
ClassLoaderAwareCache.getCacheConfiguration()
Gets the cache configuration this cache was created with.
|
Modifier and Type | Method and Description |
---|---|
void |
CacheSamplerImpl.deregistered(CacheConfiguration config)
Indicates that this listener was removed from the given configuration
|
void |
CacheSamplerImpl.registered(CacheConfiguration config)
Indicates that this listener was registered with the given configuration
|
Modifier and Type | Method and Description |
---|---|
void |
MemoryStore.deregistered(CacheConfiguration config)
Indicates that this listener was removed from the given configuration
|
void |
MemoryStore.registered(CacheConfiguration config)
Indicates that this listener was registered with the given configuration
|
Constructor and Description |
---|
DefaultElementValueComparator(CacheConfiguration cacheConfiguration)
Constructor
|
LegacyStoreWrapper(Store memory,
Store disk,
RegisteredEventListeners eventListeners,
CacheConfiguration config)
Create a correctly locked store wrapper around the supplied in-memory and on disk stores.
|
MemoryOnlyStore(CacheConfiguration cacheConfiguration,
MemoryStore authority,
SearchManager searchManager)
Create a MemoryOnlyStore
|
Constructor and Description |
---|
Segment(int initialCapacity,
float loadFactor,
DiskStorageFactory primary,
CacheConfiguration cacheConfiguration,
PoolAccessor onHeapPoolAccessor,
PoolAccessor onDiskPoolAccessor,
RegisteredEventListeners cacheEventNotificationService)
Create a Segment with the given initial capacity, load-factor, primary element substitute factory, and identity element substitute factory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
TerracottaClient.createClusteredInstanceFactory(Map<String,CacheConfiguration> cacheConfigs)
Returns true if the clusteredInstanceFactory was created, otherwise returns false.
|
Modifier and Type | Method and Description |
---|---|
protected WriteBehind |
WriteBehindQueueManager.WriteBehindQueueFactory.createQueue(int index,
CacheConfiguration config)
Create a write behind queue stripe.
|
Constructor and Description |
---|
AbstractWriteBehindQueue(CacheConfiguration config)
Create a new write behind queue.
|
WriteBehindQueueManager(CacheConfiguration config)
Create a new write behind queue manager.
|
WriteBehindQueueManager(CacheConfiguration config,
WriteBehindQueueManager.WriteBehindQueueFactory queueFactory)
Create the write behind queue manager with queues created via the passed in
WriteBehindQueueManager.WriteBehindQueueFactory |
Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.