java.src.com.exactpro.th2.read.db.grpc.ReadDbDefaultBlockingImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-read-db Show documentation
Show all versions of grpc-read-db Show documentation
gRPC API for executing requests in read-db application
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);
}
}