Class CacheLoader
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.util.CacheLoader
CacheLoader provides efficient mechanisms for storing lots of data.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceIf you are interested in the results of your data load, this interface will receive them. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MemcachedClientIFprivate final ExecutorServiceprivate final intprivate final CacheLoader.StorageListener -
Constructor Summary
ConstructorsConstructorDescriptionSimple CacheLoader constructor that doesn't provide any feedback and caches forever.CacheLoader(MemcachedClientIF c, ExecutorService es, CacheLoader.StorageListener sl, int exp) Get a CacheLoader with all the options. -
Method Summary
-
Field Details
-
executorService
-
storageListener
-
client
-
expiration
private final int expiration
-
-
Constructor Details
-
CacheLoader
Simple CacheLoader constructor that doesn't provide any feedback and caches forever.- Parameters:
c- a client
-
CacheLoader
public CacheLoader(MemcachedClientIF c, ExecutorService es, CacheLoader.StorageListener sl, int exp) Get a CacheLoader with all the options.- Parameters:
c- a clientes- an ExecutorService (e.g. thread pool) to dispatch results (may be null, in which case no listener may be provided)sl- a storage listener (may be null)exp- expiration to use while loading
-
-
Method Details
-
loadData
-
loadData
-
push
-
watch
-