Package com.google.longrunning.stub
Class GrpcOperationsStub
- java.lang.Object
-
- com.google.longrunning.stub.OperationsStub
-
- com.google.longrunning.stub.GrpcOperationsStub
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource,AutoCloseable
public class GrpcOperationsStub extends OperationsStub
gRPC stub implementation for Google Long Running Operations API.This class is for advanced usage and reflects the underlying API directly.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGrpcOperationsStub(OperationsStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext)Constructs an instance of GrpcOperationsStub, using the given settings.protectedGrpcOperationsStub(OperationsStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, GrpcStubCallableFactory callableFactory)Constructs an instance of GrpcOperationsStub, using the given settings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long duration, TimeUnit unit)com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.CancelOperationRequest,com.google.protobuf.Empty>cancelOperationCallable()voidclose()static GrpcOperationsStubcreate(com.google.api.gax.rpc.ClientContext clientContext)static GrpcOperationsStubcreate(com.google.api.gax.rpc.ClientContext clientContext, GrpcStubCallableFactory callableFactory)static GrpcOperationsStubcreate(OperationsStubSettings settings)com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.DeleteOperationRequest,com.google.protobuf.Empty>deleteOperationCallable()com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.GetOperationRequest,com.google.longrunning.Operation>getOperationCallable()booleanisShutdown()booleanisTerminated()com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.ListOperationsRequest,com.google.longrunning.ListOperationsResponse>listOperationsCallable()com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.ListOperationsRequest,OperationsClient.ListOperationsPagedResponse>listOperationsPagedCallable()voidshutdown()voidshutdownNow()com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.WaitOperationRequest,com.google.longrunning.Operation>waitOperationCallable()
-
-
-
Constructor Detail
-
GrpcOperationsStub
protected GrpcOperationsStub(OperationsStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext) throws IOException
Constructs an instance of GrpcOperationsStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
GrpcOperationsStub
protected GrpcOperationsStub(OperationsStubSettings settings, com.google.api.gax.rpc.ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException
Constructs an instance of GrpcOperationsStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
-
Method Detail
-
create
public static final GrpcOperationsStub create(OperationsStubSettings settings) throws IOException
- Throws:
IOException
-
create
public static final GrpcOperationsStub create(com.google.api.gax.rpc.ClientContext clientContext) throws IOException
- Throws:
IOException
-
create
public static final GrpcOperationsStub create(com.google.api.gax.rpc.ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException
- Throws:
IOException
-
getOperationCallable
public com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.GetOperationRequest,com.google.longrunning.Operation> getOperationCallable()
- Overrides:
getOperationCallablein classOperationsStub
-
listOperationsPagedCallable
public com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.ListOperationsRequest,OperationsClient.ListOperationsPagedResponse> listOperationsPagedCallable()
- Overrides:
listOperationsPagedCallablein classOperationsStub
-
listOperationsCallable
public com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.ListOperationsRequest,com.google.longrunning.ListOperationsResponse> listOperationsCallable()
- Overrides:
listOperationsCallablein classOperationsStub
-
cancelOperationCallable
public com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.CancelOperationRequest,com.google.protobuf.Empty> cancelOperationCallable()
- Overrides:
cancelOperationCallablein classOperationsStub
-
deleteOperationCallable
public com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.DeleteOperationRequest,com.google.protobuf.Empty> deleteOperationCallable()
- Overrides:
deleteOperationCallablein classOperationsStub
-
waitOperationCallable
public com.google.api.gax.rpc.UnaryCallable<com.google.longrunning.WaitOperationRequest,com.google.longrunning.Operation> waitOperationCallable()
- Overrides:
waitOperationCallablein classOperationsStub
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classOperationsStub
-
shutdown
public void shutdown()
-
isShutdown
public boolean isShutdown()
-
isTerminated
public boolean isTerminated()
-
shutdownNow
public void shutdownNow()
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException- Throws:
InterruptedException
-
-