Package com.opengamma.engine.cache

Examples of com.opengamma.engine.cache.DeferredViewComputationCache


    }

  }

  private DeferredViewComputationCache getDeferredViewComputationCache(final ViewComputationCache cache) {
    DeferredViewComputationCache deferred = s_deferredCaches.get(cache);
    if (deferred == null) {
      if (isUseWriteBehindSharedCache() || isUseWriteBehindPrivateCache()) {
        deferred = new WriteBehindViewComputationCache(cache, getExecutorService(), isUseWriteBehindSharedCache(), isUseWriteBehindPrivateCache());
      } else {
        deferred = new DirectWriteViewComputationCache(cache);
      }
      final DeferredViewComputationCache existing = s_deferredCaches.putIfAbsent(cache, deferred);
      if (existing != null) {
        return existing;
      }
    }
    return deferred;
View Full Code Here


      }
    }
    final Collection<ComputedValue> inputs = new ArrayList<ComputedValue>(inputValueSpecs.length);
    int inputBytes = 0;
    int inputSamples = 0;
    final DeferredViewComputationCache cache = getCache();
    _inputs._inputs = inputValueSpecs;
    for (final Pair<ValueSpecification, Object> input : cache.getValues(_inputs, getJob().getCacheSelectHint())) {
      if ((input.getSecond() == null) || (input.getSecond() instanceof MissingValue)) {
        missing.add(input.getFirst());
      } else {
        final ComputedValue value = new ComputedValue(input.getFirst(), input.getSecond());
        inputs.add(value);
        final Integer bytes = cache.estimateValueSize(value);
        if (bytes != null) {
          inputBytes += bytes;
          inputSamples++;
        }
      }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.cache.DeferredViewComputationCache

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.