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

x33g5p2x  于2022-01-19 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(192)

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

Ehcache.loadAll介绍

[英]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. 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.
[中]loadAll方法提供了将对象“预加载”到缓存中的方法。此方法将使用关联的缓存加载程序异步地将指定对象加载到缓存中。如果缓存中已存在对象,则不采取任何操作。如果没有加载程序与该对象关联,则不会将任何对象加载到缓存中。如果在检索或加载对象期间遇到问题,则应记录异常(待定义)。getAll方法将从缓存返回与参数“keys”中的键集合关联的对象的映射。如果对象不在缓存中,将调用关联的缓存加载程序。如果没有加载程序与对象关联,则返回null。如果在检索或加载对象期间遇到问题,将引发异常(待定义)。如果设置了“arg”参数,则arg对象将传递给CacheLoader。loadAll方法。缓存不会取消对对象的引用。如果未提供“arg”值,则会将null传递给loadAll方法。

代码示例

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

/**
 * {@inheritDoc}
 */
public void loadAll(Collection keys, Object argument) throws CacheException {
  underlyingCache.loadAll(keys, argument);
}

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

/**
* {@inheritDoc}
*/
public void loadAll(Collection arg0, Object arg1) throws CacheException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    this.cache.loadAll(arg0, arg1);
  } finally {
    t.setContextClassLoader(prev);
  }
}

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

/**
 * {@inheritDoc}
 */
public void loadAll(Collection keys, Object argument) throws CacheException {
  underlyingCache.loadAll(keys, argument);
}

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

/**
 * {@inheritDoc}
 */
public void loadAll(Collection keys, Object argument) throws CacheException {
  underlyingCache.loadAll(keys, argument);
}

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

/**
 * {@inheritDoc}
 */
public void loadAll(Collection keys, Object argument) throws CacheException {
  underlyingCache.loadAll(keys, argument);
}

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

/**
* {@inheritDoc}
*/
public void loadAll(Collection arg0, Object arg1) throws CacheException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    this.cache.loadAll(arg0, arg1);
  } finally {
    t.setContextClassLoader(prev);
  }
}

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

/**
* {@inheritDoc}
*/
public void loadAll(Collection arg0, Object arg1) throws CacheException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    this.cache.loadAll(arg0, arg1);
  } finally {
    t.setContextClassLoader(prev);
  }
}

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

/**
* {@inheritDoc}
*/
public void loadAll(Collection arg0, Object arg1) throws CacheException {
  // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  Thread t = Thread.currentThread();
  ClassLoader prev = t.getContextClassLoader();
  t.setContextClassLoader(this.classLoader);
  try {
    this.cache.loadAll(arg0, arg1);
  } finally {
    t.setContextClassLoader(prev);
  }
}

代码示例来源:origin: com.madgag/mini-git-server-server

@SuppressWarnings("unchecked")
public void loadAll(Collection keys, Object argument) throws CacheException {
 self().loadAll(keys, argument);
}

代码示例来源:origin: rtyley/mini-git-server

@SuppressWarnings("unchecked")
public void loadAll(Collection keys, Object argument) throws CacheException {
 self().loadAll(keys, argument);
}

相关文章

Ehcache类方法