Package com.opengamma.engine.cache.msg

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


            }
            response.add(value);
          }
        }
      }
      return new GetResponse(response);
    }
View Full Code Here


  @Override
  public FudgeMsg get(long identifier) {
    final GetRequest request = new GetRequest(getCacheKey().getViewCycleId(), getCacheKey()
        .getCalculationConfigurationName(), Collections.singleton(identifier));
    final GetResponse response = getRemoteCacheClient().sendGetMessage(request, GetResponse.class);
    final FudgeMsg data = response.getData().get(0);
    return data.isEmpty() ? null : data;
  }
View Full Code Here

  @Override
  public Map<Long, FudgeMsg> get(Collection<Long> identifiers) {
    final GetRequest request = new GetRequest(getCacheKey().getViewCycleId(), getCacheKey()
        .getCalculationConfigurationName(), identifiers);
    final GetResponse response = getRemoteCacheClient().sendGetMessage(request, GetResponse.class);
    final Map<Long, FudgeMsg> result = new HashMap<Long, FudgeMsg>();
    final List<FudgeMsg> values = response.getData();
    if (values.size() != identifiers.size()) {
      // An error at the server end, possibly an invalid cache (gives a result with just one null in)
      return Collections.emptyMap();
    }
    int i = 0;
View Full Code Here

TOP

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

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.