|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.tbee.cache.simple.CacheFactory
public class CacheFactory
This class keeps an eye on all created caches.
Again using a WeakReference so it is cleaned out automatically if the actual user doesn't use it anymore.
You should use the factory if you want to be able to remove objects from all existing caches.
| Field Summary | |
|---|---|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Constructor Summary | |
|---|---|
CacheFactory()
|
|
| Method Summary | |
|---|---|
static void |
clearAllCaches()
Clear all caches |
static Cache |
newHashMapCache()
|
static Cache |
newHashMapCacheSoft()
|
static Cache |
newHashMapCacheWeak()
|
static Cache |
newLeastRecentlyUsedCache(int pSize)
|
static Cache |
newLeastRecentlyUsedCacheSoft(int pSize)
|
static Cache |
newLeastRecentlyUsedCacheWeak(int pSize)
|
static Cache |
newLifespanCache(int pLifespan)
|
static Cache |
newLifespanCacheSoft(int pLifespan)
|
static Cache |
newLifespanCacheWeak(int pLifespan)
|
static Cache |
newTimeoutCache(int pTimeout)
|
static Cache |
newTimeoutCacheSoft(int pTimeout)
|
static Cache |
newTimeoutCacheWeak(int pTimeout)
|
static void |
removeFromAllCaches(Object key)
Remove a certain key from all caches |
static void |
removeValueFromAllCaches(Object value)
Remove a certain value from all caches |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
| Constructor Detail |
|---|
public CacheFactory()
| Method Detail |
|---|
public static Cache newHashMapCache()
public static Cache newHashMapCacheSoft()
public static Cache newHashMapCacheWeak()
public static Cache newLeastRecentlyUsedCache(int pSize)
public static Cache newLeastRecentlyUsedCacheSoft(int pSize)
public static Cache newLeastRecentlyUsedCacheWeak(int pSize)
public static Cache newLifespanCache(int pLifespan)
public static Cache newLifespanCacheSoft(int pLifespan)
public static Cache newLifespanCacheWeak(int pLifespan)
public static Cache newTimeoutCache(int pTimeout)
public static Cache newTimeoutCacheSoft(int pTimeout)
public static Cache newTimeoutCacheWeak(int pTimeout)
public static void clearAllCaches()
public static void removeFromAllCaches(Object key)
public static void removeValueFromAllCaches(Object value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||