net.sf.ehcache.Cache.asynchronousLoadAll()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中net.sf.ehcache.Cache.asynchronousLoadAll()方法的一些代码示例,展示了Cache.asynchronousLoadAll()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.asynchronousLoadAll()方法的具体详情如下:
包路径:net.sf.ehcache.Cache
类名称:Cache
方法名:asynchronousLoadAll

Cache.asynchronousLoadAll介绍

[英]Creates a future to perform the load
[中]创建未来以执行加载

代码示例

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * 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);
}

代码示例来源:origin: net.sf.ehcache/ehcache

Future future = asynchronousLoadAll(missingKeys, loaderArgument);

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * 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);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * 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);
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * 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);
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

Future future = asynchronousLoadAll(missingKeys, loaderArgument);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

Future future = asynchronousLoadAll(missingKeys, loaderArgument);

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

Future future = asynchronousLoadAll(missingKeys, loaderArgument);

相关文章

微信公众号

最新文章

更多

Cache类方法