public interface BlockWorkerClient extends Closeable
Modifier and Type | Interface and Description |
---|---|
static class |
BlockWorkerClient.Factory
Factory for block worker client.
|
Modifier and Type | Method and Description |
---|---|
void |
cache(CacheRequest request)
Caches a block.
|
ClearMetricsResponse |
clearMetrics(ClearMetricsRequest request)
Clear the worker metrics.
|
io.grpc.stub.StreamObserver<CreateLocalBlockRequest> |
createLocalBlock(io.grpc.stub.StreamObserver<CreateLocalBlockResponse> responseObserver)
Creates a local block on the worker.
|
boolean |
isHealthy() |
boolean |
isShutdown() |
MoveBlockResponse |
moveBlock(MoveBlockRequest request)
Move a block from worker.
|
io.grpc.stub.StreamObserver<OpenLocalBlockRequest> |
openLocalBlock(io.grpc.stub.StreamObserver<OpenLocalBlockResponse> responseObserver)
Opens a local block.
|
io.grpc.stub.StreamObserver<ReadRequest> |
readBlock(io.grpc.stub.StreamObserver<ReadResponse> responseObserver)
Reads a block from the worker.
|
RemoveBlockResponse |
removeBlock(RemoveBlockRequest request)
Removes a block from worker.
|
io.grpc.stub.StreamObserver<WriteRequest> |
writeBlock(io.grpc.stub.StreamObserver<WriteResponse> responseObserver)
Writes a block to the worker asynchronously.
|
boolean isShutdown()
boolean isHealthy()
io.grpc.stub.StreamObserver<WriteRequest> writeBlock(io.grpc.stub.StreamObserver<WriteResponse> responseObserver)
responseObserver
- the stream observer for the server responseio.grpc.stub.StreamObserver<ReadRequest> readBlock(io.grpc.stub.StreamObserver<ReadResponse> responseObserver)
responseObserver
- the stream observer for the server responseio.grpc.stub.StreamObserver<CreateLocalBlockRequest> createLocalBlock(io.grpc.stub.StreamObserver<CreateLocalBlockResponse> responseObserver)
responseObserver
- the stream observer for the server responseio.grpc.stub.StreamObserver<OpenLocalBlockRequest> openLocalBlock(io.grpc.stub.StreamObserver<OpenLocalBlockResponse> responseObserver)
responseObserver
- the stream observer for the server responseRemoveBlockResponse removeBlock(RemoveBlockRequest request)
request
- the remove block requestio.grpc.StatusRuntimeException
- if any error occursMoveBlockResponse moveBlock(MoveBlockRequest request)
request
- the remove block requestio.grpc.StatusRuntimeException
- if any error occursClearMetricsResponse clearMetrics(ClearMetricsRequest request)
request
- the request to clear metricsvoid cache(CacheRequest request)
request
- the cache requestio.grpc.StatusRuntimeException
- if any error occursCopyright © 2023. All Rights Reserved.