Examples of GetResponse


Examples of com.apitrary.api.response.GetResponse

    log.debug("Searching " + entity + " " + id);

    GetRequest request = new GetRequest();
    request.setEntity(resolveApitraryEntity(entity));
    request.setId(id);
    GetResponse response = resolveApitraryClient().send(request);

    T result = (T) new GetResponseUnmarshaller(this).unMarshall(response, entity);

    if (result != null) {
      List<Field> fields = ClassUtil.getAnnotatedFields(entity, Id.class);
View Full Code Here

Examples of com.couchbase.client.core.message.kv.GetResponse

                final ByteBuf extras = ctx.alloc().buffer(msg.getExtrasLength());
                extras.writeBytes(extrasReleased, extrasReleased.readerIndex(), extrasReleased.readableBytes());
                flags = extras.getInt(0);
                extras.release();
            }
            response = new GetResponse(status, cas, flags, bucket, content, request);
        } else if (request instanceof GetBucketConfigRequest) {
            response = new GetBucketConfigResponse(status, bucket, content,
                ((GetBucketConfigRequest) request).hostname());
        } else if (request instanceof InsertRequest) {
            response = new InsertResponse(status, cas, bucket, content, request);
View Full Code Here

Examples of com.google.apphosting.api.DatastorePb.GetResponse

      Reference ref = KeyTranslator.convertToPb(key);

      int encodedKeySize = Protocol.stringSize(ref.encodingSize()) + 1;
      if (getDatastoreServiceConfig().exceedsReadLimits(
          req.keySize() + 1, encodedReqSize + encodedKeySize)) {
        futures.add(makeAsyncCall(apiConfig, "Get", req, new GetResponse()));
        encodedReqSize = baseEncodedReqSize;
        req = baseReq.clone();
      }

      encodedReqSize += encodedKeySize;
      req.addKey(ref);
    }

    if (req.keySize() > 0) {
      futures.add(makeAsyncCall(apiConfig, "Get", req, new GetResponse()));
    }

    return registerInTransaction(txn,
        new IteratingAggregateFuture<GetResponse, Key, Map<Key, Entity>>(futures) {
          @Override
View Full Code Here

Examples of com.google.apphosting.api.DatastorePb.GetResponse

    public int getCost() {
      return cost;
    }

    public synchronized void postCall(byte[] result) {
      GetResponse pr = new GetResponse();
      pr.mergeFrom(result);
      Exception exception = new Exception();
      exception.fillInStackTrace();
      StackTraceElement[] stackTrace = exception.getStackTrace();
      requestInfo = new GetRequestInfo("Get Request", stackTrace);
      int entitySize = pr.entitySize();

      int size = pr.entitySize();
      cost = size * 10;

      if (requestInfo != null) {
        requestInfo.entityCount += entitySize;
        requestInfo.count++;
View Full Code Here

Examples of com.google.apphosting.datastore.DatastoreV3Pb.GetResponse

          throws ExecutionException, InterruptedException, TimeoutException {
        while (true) {
          List<Reference> deferredRefs = Lists.newLinkedList();

          for (Future<GetResponse> currentFuture : currentFutures) {
            GetResponse resp = getFutureWithOptionalTimeout(currentFuture, timeout, timeoutUnit);
            addEntitiesToResultMap(resp);
            deferredRefs.addAll(resp.deferreds());
          }

          if (deferredRefs.isEmpty()) {
            break;
          }
View Full Code Here

Examples of com.google.nigori.common.NigoriMessages.GetResponse

    // TODO(drt24) add index
    List<RevisionValue> protoRevisions = new ArrayList<RevisionValue>(revisions.size());
    for (RevValue rv : revisions){
      protoRevisions.add(RevisionValue.newBuilder().setRevision(ByteString.copyFrom(rv.getRevision().getBytes())).setValue(ByteString.copyFrom(rv.getValue())).build());
    }
    GetResponse resp = GetResponse.newBuilder()
        .addAllRevisions(protoRevisions)
        .build();

    return resp;
  }
View Full Code Here

Examples of com.google.nigori.common.NigoriMessages.GetResponse

    public void handle(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
        IOException, JsonConversionException, NotFoundException, UnauthorisedException {

      String json = getJsonAsString(req, maxJsonQueryLength);
      GetRequest request = MessageLibrary.getRequestFromJson(json);
      GetResponse response = protocol.get(request);

      String jsonresponse = MessageLibrary.toJson(response);
      resp.setContentType(MessageLibrary.MIMETYPE_JSON);
      resp.setCharacterEncoding(MessageLibrary.CHARSET);
      resp.setStatus(HttpServletResponse.SC_OK);
View Full Code Here

Examples of com.google.nigori.common.NigoriMessages.GetResponse

        encRevision = keyManager.encryptDeterministically(encKey, revision.getBytes());
      }
    }

    try {
      GetResponse getResponse =
          protocol.get(MessageLibrary.getRequestAsProtobuf(keyManager.getServerName(),
              keyManager.signer(), encIndex, encRevision));
      if (getResponse == null) {
        return null;
      }
      List<RevisionValue> revisions = getResponse.getRevisionsList();
      List<RevValue> answer = new ArrayList<RevValue>(revisions.size());
      for (RevisionValue revisionValue : revisions) {
        byte[] revisionciphertext = revisionValue.getRevision().toByteArray();
        byte[] valueciphertext = revisionValue.getValue().toByteArray();
        if (encKey == null) {
View Full Code Here

Examples of com.google.nigori.common.NigoriMessages.GetResponse

    out.flush();

    runReplayVerifyWithDoPost(out);

    String jsonResponse = new String(result.getValue(), 0, size.getValue(), MessageLibrary.CHARSET);
    GetResponse getResponse = MessageLibrary.getResponseFromJson(jsonResponse);

    List<RevisionValue> revs = getResponse.getRevisionsList();
    assertEquals(1, revs.size());
    for (RevisionValue rev : revs) {
      assertArrayEquals(revision, rev.getRevision().toByteArray());
      assertArrayEquals(value, rev.getValue().toByteArray());
    }
View Full Code Here

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

            }
            response.add(value);
          }
        }
      }
      return new GetResponse(response);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.