public class CacheFactory extends Object
Constructor and Description |
---|
CacheFactory() |
Modifier and Type | Method and Description |
---|---|
static <Key,Value> |
createCache(float loadFactor,
int maxSize)
Create a cache which has space for up to a certain number of objects.
|
static <Key,Value> |
createCache(Getter<Key,Value> getter,
int maxSize)
Create a cache which has space for upto a certain number of objects.
|
static <Key,Value> |
createCache(int maxSize)
Create a cache which has space for up to a certain number of objects.
|
static <Obj> CacheSet<Obj> |
createCacheSet(int size)
Create set-cache, rather than a map-cache.
|
static <Key,Value> |
createCacheUnbounded()
Create a cache which has unbounded space
|
static <Key,Value> |
createCacheWithGetter(Cache<Key,Value> cache,
Getter<Key,Value> getter) |
static <Key,Value> |
createNullCache()
Create a null cache
|
static <Key,Value> |
createOneSlotCache()
One slot cache
|
static <Key,Value> |
createSimpleCache(int size)
Create a lightweight cache (e.g.
|
static <Key,Value> |
createStats(Cache<Key,Value> cache)
Add a statistics wrapper to an existing cache
|
static <Key,Value> |
createSync(Cache<Key,Value> cache)
Add a synchronization wrapper to an existing cache
|
static <Obj> CacheSet<Obj> |
createSync(CacheSet<Obj> cache)
Add a synchronization wrapper to an existing set-cache
|
public static <Key,Value> Cache<Key,Value> createCache(int maxSize)
public static <Key,Value> Cache<Key,Value> createCache(float loadFactor, int maxSize)
public static <Key,Value> Cache<Key,Value> createCache(Getter<Key,Value> getter, int maxSize)
public static <Key,Value> Cache<Key,Value> createNullCache()
public static <Key,Value> Cache<Key,Value> createCacheUnbounded()
public static <Key,Value> Cache<Key,Value> createCacheWithGetter(Cache<Key,Value> cache, Getter<Key,Value> getter)
public static <Key,Value> Cache<Key,Value> createSimpleCache(int size)
public static <Key,Value> Cache<Key,Value> createOneSlotCache()
public static <Key,Value> CacheStats<Key,Value> createStats(Cache<Key,Value> cache)
public static <Key,Value> Cache<Key,Value> createSync(Cache<Key,Value> cache)
public static <Obj> CacheSet<Obj> createCacheSet(int size)
Pool
Licenced under the Apache License, Version 2.0