Package com.google.longrunning.stub
Class GrpcOperationsStub
- java.lang.Object
-
- com.google.longrunning.stub.OperationsStub
-
- com.google.longrunning.stub.GrpcOperationsStub
-
- All Implemented Interfaces:
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, ClientContext clientContext)Constructs an instance of GrpcOperationsStub, using the given settings.protectedGrpcOperationsStub(OperationsStubSettings settings, ClientContext clientContext, GrpcStubCallableFactory callableFactory)Constructs an instance of GrpcOperationsStub, using the given settings.
-
Method Summary
-
-
-
Constructor Detail
-
GrpcOperationsStub
protected GrpcOperationsStub(OperationsStubSettings settings, 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, 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(ClientContext clientContext) throws IOException
- Throws:
IOException
-
create
public static final GrpcOperationsStub create(ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException
- Throws:
IOException
-
getOperationCallable
public UnaryCallable<GetOperationRequest,Operation> getOperationCallable()
- Overrides:
getOperationCallablein classOperationsStub
-
listOperationsPagedCallable
public UnaryCallable<ListOperationsRequest,OperationsClient.ListOperationsPagedResponse> listOperationsPagedCallable()
- Overrides:
listOperationsPagedCallablein classOperationsStub
-
listOperationsCallable
public UnaryCallable<ListOperationsRequest,ListOperationsResponse> listOperationsCallable()
- Overrides:
listOperationsCallablein classOperationsStub
-
cancelOperationCallable
public UnaryCallable<CancelOperationRequest,com.google.protobuf.Empty> cancelOperationCallable()
- Overrides:
cancelOperationCallablein classOperationsStub
-
deleteOperationCallable
public UnaryCallable<DeleteOperationRequest,com.google.protobuf.Empty> deleteOperationCallable()
- Overrides:
deleteOperationCallablein classOperationsStub
-
waitOperationCallable
public UnaryCallable<WaitOperationRequest,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
-
-