net.sf.ehcache.store
Class MemoryLimitedCacheLoader
java.lang.Object
   net.sf.ehcache.store.MemoryLimitedCacheLoader
net.sf.ehcache.store.MemoryLimitedCacheLoader
- All Implemented Interfaces: 
- Cloneable, BootstrapCacheLoader
- Direct Known Subclasses: 
- DiskStoreBootstrapCacheLoader, TerracottaBootstrapCacheLoader
- public abstract class MemoryLimitedCacheLoader 
- extends Object- implements BootstrapCacheLoader, Cloneable
Abstract class for BootstrapCacheLoader implementers that should alter their load behavior (probably stop loading)
 whenever the cache being bootstrapped has reached its in-memory limit (off- or on-heap)
- Author:
- Alex Snaps
 
| Method Summary | 
|  Object | clone()Clones the loader
 | 
| protected  boolean | isInMemoryLimitReached(Ehcache cache,
                       int loadedElements)Checks whether the cache has reached the limit configured for in-memory storage
 | 
 
 
 
MemoryLimitedCacheLoader
public MemoryLimitedCacheLoader()
isInMemoryLimitReached
protected boolean isInMemoryLimitReached(Ehcache cache,
                                         int loadedElements)
- Checks whether the cache has reached the limit configured for in-memory storage
 
- 
 
- 
- Parameters:
- cache- The cache being loaded and to be checked for limit being reached
- loadedElements- amounts of elements loaded so far
- Returns:
- true if on-heap or off-heap limit has been reached, false otherwise
 
clone
public Object clone()
             throws CloneNotSupportedException
- Clones the loader
 
- 
- Specified by:
- clonein interface- BootstrapCacheLoader
- Overrides:
- clonein class- Object
 
- 
- Throws:
- CloneNotSupportedException
 
Copyright 2001-2015, Terracotta, Inc.