Class DurableTaskGrpcWorker
- All Implemented Interfaces:
AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the internally managed gRPC channel and executor service, if one exists.voidstart()Establishes a gRPC connection to the sidecar and starts processing work-items in the background.voidEstablishes a gRPC connection to the sidecar and starts processing work-items on the current thread.voidstop()Stops the current worker's listen loop, preventing any new orchestrator or activity events from being processed.
-
Method Details
-
start
public void start()Establishes a gRPC connection to the sidecar and starts processing work-items in the background.This method retries continuously to establish a connection to the sidecar. If a connection fails, a warning log message will be written and a new connection attempt will be made. This process continues until either a connection succeeds or the process receives an interrupt signal.
-
close
public void close()Closes the internally managed gRPC channel and executor service, if one exists.Only the internally managed GRPC Channel and Executor services are closed. If any of them are supplied, it is the responsibility of the supplier to take care of them.
- Specified by:
closein interfaceAutoCloseable
-
startAndBlock
public void startAndBlock()Establishes a gRPC connection to the sidecar and starts processing work-items on the current thread. This method call blocks indefinitely, or until the current thread is interrupted.Use can alternatively use the
start()method to run orchestration processing in a background thread.This method retries continuously to establish a connection to the sidecar. If a connection fails, a warning log message will be written and a new connection attempt will be made. This process continues until either a connection succeeds or the process receives an interrupt signal.
-
stop
public void stop()Stops the current worker's listen loop, preventing any new orchestrator or activity events from being processed.
-