Package javax.cache

Examples of javax.cache.CacheLoader


                                long now)
  {
    MnodeValue mnodeValue = getClusterBacking().loadClusterValue(entry, config);
   
    if (mnodeValue == null || mnodeValue.isEntryExpired(now)) {
      CacheLoader loader = config.getCacheLoader();

      if (loader != null && entry.getKey() != null) {
        Object value = loader.load(entry.getKey());

        if (value != null) {
          put(entry, value, config, now, mnodeValue);

          return;
View Full Code Here


    Object value = get(key);

    if (value != null)
      return value;

    CacheLoader loader = _config.getCacheLoader();

    value = (loader != null) ? loader.load(key) : null;

    if (value != null)
      put(key, value);
    notifyLoad(key);
View Full Code Here

   * Implements the loadAll method for a collection of keys.
   */
  public void loadAll(Collection keys)
  {
    Map<Object, Object> entries = null;
    CacheLoader loader = _config.getCacheLoader();

    if (loader == null || keys == null || keys.size() == 0)
      return;

    entries = loader.loadAll(keys);

    if (entries.isEmpty())
      return;

    for (Entry loaderEntry : entries.entrySet()) {
View Full Code Here

    Object value = get(key);

    if (value != null)
      return value;

    CacheLoader loader = _config.getCacheLoader();

    value = (loader != null) ? loader.load(key) : null;

    if (value != null)
      put(key, value);
    notifyLoad(key);
View Full Code Here

                                long now)
  {
    MnodeValue mnodeValue = loadClusterValue(entry, config);

    if (mnodeValue == null || mnodeValue.isEntryExpired(now)) {
      CacheLoader loader = config.getCacheLoader();

      if (loader != null && entry.getKey() != null) {
        Object value = loader.load(entry.getKey());

        if (value != null) {
          put(entry, value, config, now, mnodeValue);

          return;
View Full Code Here

TOP

Related Classes of javax.cache.CacheLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.