All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.src.com.exactpro.th2.read.db.grpc.ReadDbDefaultBlockingImpl Maven / Gradle / Ivy

There is a newer version: 0.0.10-dev
Show newest version
package com.exactpro.th2.read.db.grpc;

import com.exactpro.th2.service.AbstractGrpcService;
import com.exactpro.th2.service.RetryPolicy;
import com.exactpro.th2.service.StubStorage;
import com.google.protobuf.Empty;
import io.grpc.CallOptions;
import io.grpc.Channel;
import java.lang.Override;
import java.lang.String;
import java.util.Iterator;
import java.util.Map;

public class ReadDbDefaultBlockingImpl extends AbstractGrpcService implements ReadDbService {
  public ReadDbDefaultBlockingImpl() {
    super();
  }

  public ReadDbDefaultBlockingImpl(RetryPolicy retryConfiguration,
      StubStorage serviceConfiguration) {
    super(retryConfiguration, serviceConfiguration);
  }

  public Iterator execute(QueryRequest input, Map properties) {
    com.exactpro.th2.read.db.grpc.ReadDbGrpc.ReadDbBlockingStub stub = getStub(input, properties);
    return createBlockingServerStreamingRequest(() -> stub.execute(input));
  }

  public Iterator execute(QueryRequest input) {
    return execute(input, java.util.Collections.EMPTY_MAP);
  }

  public DbPullResponse startPulling(DbPullRequest input, Map properties) {
    com.exactpro.th2.read.db.grpc.ReadDbGrpc.ReadDbBlockingStub stub = getStub(input, properties);
    return createBlockingRequest(() -> stub.startPulling(input));
  }

  public DbPullResponse startPulling(DbPullRequest input) {
    return startPulling(input, java.util.Collections.EMPTY_MAP);
  }

  public Empty stopPulling(StopPullingRequest input, Map properties) {
    com.exactpro.th2.read.db.grpc.ReadDbGrpc.ReadDbBlockingStub stub = getStub(input, properties);
    return createBlockingRequest(() -> stub.stopPulling(input));
  }

  public Empty stopPulling(StopPullingRequest input) {
    return stopPulling(input, java.util.Collections.EMPTY_MAP);
  }

  @Override
  protected ReadDbGrpc.ReadDbBlockingStub createStub(Channel channel, CallOptions callOptions) {
    return com.exactpro.th2.read.db.grpc.ReadDbGrpc.newBlockingStub(channel);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy