Examples of batchGet()


Examples of com.linkedin.restli.examples.greetings.client.ComplexArrayBuilders.batchGet()

  {
    List<ComplexResourceKey<ComplexArray, ComplexArray>> complexKeys = getBatchCompleKeys();

    ComplexArrayBuilders builders = new ComplexArrayBuilders(options);
    Request<BatchKVResponse<ComplexResourceKey<ComplexArray, ComplexArray>, Greeting>> request =
        builders.batchGet().ids(complexKeys).buildKV();

    Response<BatchKVResponse<ComplexResourceKey<ComplexArray, ComplexArray>, Greeting>> response =
        REST_CLIENT.sendRequest(request).getResponse();

    Greeting greeting1 = response.getEntity().getResults().get(complexKeys.get(0));
View Full Code Here

Examples of com.linkedin.restli.examples.greetings.client.ComplexArrayBuilders.batchGet()

  {
    List<ComplexResourceKey<ComplexArray, ComplexArray>> complexKeys = getBatchCompleKeys();

    ComplexArrayBuilders builders = new ComplexArrayBuilders(options);
    Request<BatchKVResponse<ComplexResourceKey<ComplexArray, ComplexArray>, Greeting>> request2 =
      builders.batchGet().ids(complexKeys).buildKV();

    Response<BatchKVResponse<ComplexResourceKey<ComplexArray, ComplexArray>, Greeting>> response2 =
      REST_CLIENT.sendRequest(request2).getResponse();

    Greeting greeting1 = response2.getEntity().getResults().get(complexKeys.get(0));
View Full Code Here

Examples of com.linkedin.restli.examples.greetings.client.ComplexArrayRequestBuilders.batchGet()

  {
    List<ComplexResourceKey<ComplexArray, ComplexArray>> complexKeys = getBatchCompleKeys();

    ComplexArrayRequestBuilders builders = new ComplexArrayRequestBuilders(options);
    Request<BatchKVResponse<ComplexResourceKey<ComplexArray, ComplexArray>, EntityResponse<Greeting>>> request2 =
      builders.batchGet().ids(complexKeys).build();

    Response<BatchKVResponse<ComplexResourceKey<ComplexArray, ComplexArray>, EntityResponse<Greeting>>> response2 =
      REST_CLIENT.sendRequest(request2).getResponse();

    EntityResponse<Greeting> greeting1 = response2.getEntity().getResults().get(complexKeys.get(0));
View Full Code Here

Examples of com.linkedin.restli.examples.greetings.client.ComplexKeysBuilders.batchGet()

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testBatchCreate(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {
    final ComplexKeysBuilders builders = new ComplexKeysBuilders(requestOptions);
    testBatchCreateMain(builders.batchCreate(), builders.batchGet());
  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testBatchCreateId(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {
View Full Code Here

Examples of com.linkedin.restli.examples.greetings.client.ComplexKeysRequestBuilders.batchGet()

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testBatchCreateId(RestliRequestOptions requestOptions) throws RemoteInvocationException
  {
    final ComplexKeysRequestBuilders builders = new ComplexKeysRequestBuilders(requestOptions);
    testBatchCreateIdMain(builders.batchCreate(), builders.batchGet());
  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
  public void testPartialUpdate(RootBuilderWrapper<ComplexResourceKey<TwoPartKey, TwoPartKey>, Message> builders) throws RemoteInvocationException
  {
View Full Code Here

Examples of com.linkedin.restli.examples.greetings.client.GreetingsBuilders.batchGet()

  public void testOldCookbookInBatch(RestliRequestOptions requestOptions) throws Exception
  {
    final GreetingsBuilders builders = new GreetingsBuilders(requestOptions);

    // GET
    final BatchGetRequestBuilder<Long, Greeting> batchGetBuilder = builders.batchGet();
    Request<BatchResponse<Greeting>> request = batchGetBuilder.ids(1L).build();
    ResponseFuture<BatchResponse<Greeting>> future = REST_CLIENT.sendRequest(request);
    Response<BatchResponse<Greeting>> greetingResponse = future.getResponse();

    // PUT
View Full Code Here

Examples of com.linkedin.restli.examples.greetings.client.GreetingsRequestBuilders.batchGet()

  public void testNewCookbookInBatch(RestliRequestOptions requestOptions) throws Exception
  {
    final GreetingsRequestBuilders builders = new GreetingsRequestBuilders(requestOptions);

    // GET
    final BatchGetEntityRequestBuilder<Long, Greeting> batchGetBuilder = builders.batchGet();
    Request<BatchKVResponse<Long, EntityResponse<Greeting>>> request = batchGetBuilder.ids(1L).build();
    ResponseFuture<BatchKVResponse<Long, EntityResponse<Greeting>>> future = REST_CLIENT.sendRequest(request);
    Response<BatchKVResponse<Long, EntityResponse<Greeting>>> greetingResponse = future.getResponse();

    // PUT
View Full Code Here

Examples of com.linkedin.restli.server.twitter.AsyncDiscoveredItemsResource.batchGet()

    @SuppressWarnings("unchecked")
    Set<ComplexResourceKey<DiscoveredItemKey, DiscoveredItemKeyParams>> set =
        (Set<ComplexResourceKey<DiscoveredItemKey, DiscoveredItemKeyParams>>)
            Matchers.eqCollectionUnordered(Sets.newHashSet(keyA, keyB));

    discoveredItemsResource.batchGet(
        set,
        EasyMock.<Callback<Map<ComplexResourceKey<DiscoveredItemKey, DiscoveredItemKeyParams>, DiscoveredItem>>>anyObject());

    EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
      @Override
View Full Code Here

Examples of com.linkedin.restli.server.twitter.AsyncFollowsAssociativeResource.batchGet()

    CompoundKey key2 = new CompoundKey();
    key2.append("followeeID", 2L);
    key2.append("followerID", 2L);
    expectedKeys.add(key2);

    followsResource.batchGet((Set<CompoundKey>) Matchers.eqCollectionUnordered(expectedKeys),
                             (Callback<Map<CompoundKey, Followed>>) EasyMock.anyObject());
    EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
      @Override
      public Object answer() throws Throwable {
        @SuppressWarnings("unchecked")
View Full Code Here

Examples of com.linkedin.restli.server.twitter.AsyncStatusCollectionResource.batchGet()

    AsyncDiscoveredItemsResource discoveredItemsResource;

    // #1 Batch get on collection resource
    methodDescriptor = statusResourceModel.findMethod(ResourceMethod.BATCH_GET);
    statusResource = getMockResource(AsyncStatusCollectionResource.class);
    statusResource.batchGet((Set<Long>)Matchers.eqCollectionUnordered(Sets.newHashSet(1L, 2L, 3L)),
                            EasyMock.<Callback<Map<Long, Status>>> anyObject());
    EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
      @Override
      public Object answer() throws Throwable {
        @SuppressWarnings("unchecked")
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.