Package com.google.walkaround.proto

Examples of com.google.walkaround.proto.ServerMutateRequest


      throw new RuntimeException(e);
    }
    long timestamp = System.currentTimeMillis();
    List<String> deltas = makeDeltas(timestamp, requireParameter(req, "operations"));

    ServerMutateRequest mutateRequest = new ServerMutateRequestGsonImpl();
    mutateRequest.setSession(ObjectSessionHelper.protoFromObjectSession(session));
    mutateRequest.setVersion(version);
    mutateRequest.addAllPayload(deltas);

    MutateResult res;
    try {
      res = storeSelector.get(session.getStoreType()).getSlobStore().mutateObject(mutateRequest);
    } catch (SlobNotFoundException e) {
View Full Code Here


  @Override
  public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
    accessChecker.checkPermittedStoreRequest(req);
    String requestString = requireParameter(req, "req");
    ServerMutateRequest mutateRequest;
    try {
      mutateRequest = GsonProto.fromGson(new ServerMutateRequestGsonImpl(),
          requestString);
    } catch (MessageException e) {
      throw new BadRequestException("Failed to parse request: " + requestString, e);
    }
    ObjectSession session = ObjectSessionHelper.objectSessionFromProto(mutateRequest.getSession());
    ServerMutateResponse result =
        storeSelector.get(session.getStoreType()).getLocalMutationProcessor()
        .mutateObject(mutateRequest);
    log.info("Success @" + result.getResultingVersion());
View Full Code Here

TOP

Related Classes of com.google.walkaround.proto.ServerMutateRequest

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.