Package com.opengamma.engine.cache.msg

Examples of com.opengamma.engine.cache.msg.SpecificationLookupResponse


  }

  @Override
  public ValueSpecification getValueSpecification(long identifier) {
    final SpecificationLookupRequest request = new SpecificationLookupRequest(Collections.singleton(identifier));
    final SpecificationLookupResponse response = getRemoteCacheClient().sendGetMessage(request, SpecificationLookupResponse.class);
    return MemoryUtils.instance(response.getSpecification().get(0));
  }
View Full Code Here


  }

  @Override
  public Long2ObjectMap<ValueSpecification> getValueSpecifications(LongCollection identifiers) {
    final SpecificationLookupRequest request = new SpecificationLookupRequest(identifiers);
    final SpecificationLookupResponse response = getRemoteCacheClient().sendGetMessage(request, SpecificationLookupResponse.class);
    final List<ValueSpecification> specifications = response.getSpecification();
    final Long2ObjectMap<ValueSpecification> specificationMap = new Long2ObjectOpenHashMap<ValueSpecification>();
    int i = 0;
    for (Long identifier : request.getIdentifier()) {
      specificationMap.put(identifier, MemoryUtils.instance(specifications.get(i++)));
    }
View Full Code Here

      specifications = new ArrayList<ValueSpecification>(specificationMap.size());
      for (Long identifier : identifiers) {
        specifications.add(specificationMap.get(identifier));
      }
    }
    final SpecificationLookupResponse response = new SpecificationLookupResponse(specifications);
    return response;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.cache.msg.SpecificationLookupResponse

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.