| java.lang.Object ri.cache.AsyncLoader
All known Subclasses: ri.cache.ReferenceCache,
AsyncLoader | public class AsyncLoader (Code) | | |
Inner Class :public interface AsyncLoaderCallback | |
AsyncLoader | public AsyncLoader(CacheLoader<K, V> loader, long timeoutMillis)(Code) | | Create an AsyncLoader which uses a single-threaded executor for loading
Parameters: loader - Underlying loader to perform actual loading Parameters: timeoutMillis - How long, in milliseconds, before we consider the load to have failed and cancel the loading (and notify the callback listener with an exception) |
AsyncLoader | public AsyncLoader(CacheLoader<K, V> loader, long timeoutMillis, ExecutorService executor, boolean sharedExecutor)(Code) | | Parameters: loader - Underlying loader to perform actual loading Parameters: timeoutMillis - How long, in milliseconds, before we consider the load to have failed and cancel the loading (and notify the callback listener with an exception) Parameters: executor - ExecutorService to use for actual loading Parameters: sharedExecutor - Whether this ExecutorService is to be considered owned by the AsyncLoader (in which casethe AsyncLoader should shut it down) or whether it is shared (in which case its owner should shut it down) |
load | public Future<V> load(K key, AsyncLoaderCallback<K, V> callback)(Code) | | |
shutdown | public void shutdown()(Code) | | |
|
|