/** * The loadAll method provides a means to "pre load" objects into the cache. This method will, asynchronously, load * the specified objects into the cache using the associated cache loader(s). If the an object already exists in the * cache, no action is taken. If no loader is associated with the object, no object will be loaded into the cache. * If a problem is encountered during the retrieving or loading of the objects, an exception (to be defined) * should be logged. The getAll method will return, from the cache, a Map of the objects associated with the * Collection of keys in argument "keys". If the objects are not in the cache, the associated cache loader will be * called. If no loader is associated with an object, a null is returned. If a problem is encountered during the * retrieving or loading of the objects, an exception (to be defined) will be thrown. If the "arg" argument is set, * the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference the object. * If no "arg" value is provided a null will be passed to the loadAll method. * <p> * keys - collection of the keys whose associated values to be loaded into this cache by using the associated * CacheLoader if this cache doesn't contain them. * <p> * The Ehcache native API provides similar functionality to loaders using the * decorator {@link net.sf.ehcache.constructs.blocking.SelfPopulatingCache} */ public void loadAll(final Collection keys, final Object argument) throws CacheException { if (registeredCacheLoaders.size() == 0) { LOG.debug("The CacheLoader is null. Returning."); return; } if (keys == null) { return; } asynchronousLoadAll(keys, argument); }
Future future = asynchronousLoadAll(missingKeys, loaderArgument);
/** * The loadAll method provides a means to "pre load" objects into the cache. This method will, asynchronously, load * the specified objects into the cache using the associated cache loader(s). If the an object already exists in the * cache, no action is taken. If no loader is associated with the object, no object will be loaded into the cache. * If a problem is encountered during the retrieving or loading of the objects, an exception (to be defined) * should be logged. The getAll method will return, from the cache, a Map of the objects associated with the * Collection of keys in argument "keys". If the objects are not in the cache, the associated cache loader will be * called. If no loader is associated with an object, a null is returned. If a problem is encountered during the * retrieving or loading of the objects, an exception (to be defined) will be thrown. If the "arg" argument is set, * the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference the object. * If no "arg" value is provided a null will be passed to the loadAll method. * <p> * keys - collection of the keys whose associated values to be loaded into this cache by using the associated * CacheLoader if this cache doesn't contain them. * <p> * The Ehcache native API provides similar functionality to loaders using the * decorator {@link net.sf.ehcache.constructs.blocking.SelfPopulatingCache} */ public void loadAll(final Collection keys, final Object argument) throws CacheException { if (registeredCacheLoaders.size() == 0) { LOG.debug("The CacheLoader is null. Returning."); return; } if (keys == null) { return; } asynchronousLoadAll(keys, argument); }
/** * The loadAll method provides a means to "pre load" objects into the cache. This method will, asynchronously, load * the specified objects into the cache using the associated cache loader(s). If the an object already exists in the * cache, no action is taken. If no loader is associated with the object, no object will be loaded into the cache. * If a problem is encountered during the retrieving or loading of the objects, an exception (to be defined) * should be logged. The getAll method will return, from the cache, a Map of the objects associated with the * Collection of keys in argument "keys". If the objects are not in the cache, the associated cache loader will be * called. If no loader is associated with an object, a null is returned. If a problem is encountered during the * retrieving or loading of the objects, an exception (to be defined) will be thrown. If the "arg" argument is set, * the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference the object. * If no "arg" value is provided a null will be passed to the loadAll method. * <p/> * keys - collection of the keys whose associated values to be loaded into this cache by using the associated * CacheLoader if this cache doesn't contain them. * <p/> * The Ehcache native API provides similar functionality to loaders using the * decorator {@link net.sf.ehcache.constructs.blocking.SelfPopulatingCache} */ public void loadAll(final Collection keys, final Object argument) throws CacheException { if (registeredCacheLoaders.size() == 0) { LOG.debug("The CacheLoader is null. Returning."); return; } if (keys == null) { return; } asynchronousLoadAll(keys, argument); }
/** * The loadAll method provides a means to "pre load" objects into the cache. This method will, asynchronously, load * the specified objects into the cache using the associated cache loader(s). If the an object already exists in the * cache, no action is taken. If no loader is associated with the object, no object will be loaded into the cache. * If a problem is encountered during the retrieving or loading of the objects, an exception (to be defined) * should be logged. The getAll method will return, from the cache, a Map of the objects associated with the * Collection of keys in argument "keys". If the objects are not in the cache, the associated cache loader will be * called. If no loader is associated with an object, a null is returned. If a problem is encountered during the * retrieving or loading of the objects, an exception (to be defined) will be thrown. If the "arg" argument is set, * the arg object will be passed to the CacheLoader.loadAll method. The cache will not dereference the object. * If no "arg" value is provided a null will be passed to the loadAll method. * <p/> * keys - collection of the keys whose associated values to be loaded into this cache by using the associated * CacheLoader if this cache doesn't contain them. * <p/> * The Ehcache native API provides similar functionality to loaders using the * decorator {@link net.sf.ehcache.constructs.blocking.SelfPopulatingCache} */ public void loadAll(final Collection keys, final Object argument) throws CacheException { if (registeredCacheLoaders.size() == 0) { LOG.debug("The CacheLoader is null. Returning."); return; } if (keys == null) { return; } asynchronousLoadAll(keys, argument); }
Future future = asynchronousLoadAll(missingKeys, loaderArgument);
Future future = asynchronousLoadAll(missingKeys, loaderArgument);
Future future = asynchronousLoadAll(missingKeys, loaderArgument);