public final class BlockMasterWorkerServiceHandler extends BlockMasterWorkerServiceGrpc.BlockMasterWorkerServiceImplBase
Constructor and Description |
---|
BlockMasterWorkerServiceHandler(BlockMaster blockMaster)
Creates a new instance of
BlockMasterWorkerServiceHandler . |
Modifier and Type | Method and Description |
---|---|
void |
blockHeartbeat(BlockHeartbeatPRequest request,
io.grpc.stub.StreamObserver<BlockHeartbeatPResponse> responseObserver)
Periodic block worker heartbeat returns an optional command for the block worker to execute.
|
void |
commitBlock(CommitBlockPRequest request,
io.grpc.stub.StreamObserver<CommitBlockPResponse> responseObserver)
Marks the given block as committed.
|
void |
getWorkerId(GetWorkerIdPRequest request,
io.grpc.stub.StreamObserver<GetWorkerIdPResponse> responseObserver)
Returns a worker id for the given network address.
|
void |
notifyWorkerId(NotifyWorkerIdPRequest request,
io.grpc.stub.StreamObserver<NotifyWorkerIdPResponse> responseObserver)
Notify all masters about the worker ID.
|
void |
registerWorker(RegisterWorkerPRequest request,
io.grpc.stub.StreamObserver<RegisterWorkerPResponse> responseObserver)
Registers a worker.
|
io.grpc.stub.StreamObserver<RegisterWorkerPRequest> |
registerWorkerStream(io.grpc.stub.StreamObserver<RegisterWorkerPResponse> responseObserver)
Registers a worker in a streaming way
|
void |
requestRegisterLease(GetRegisterLeasePRequest request,
io.grpc.stub.StreamObserver<GetRegisterLeasePResponse> responseObserver)
Requests a lease for registration
|
bindService
public BlockMasterWorkerServiceHandler(BlockMaster blockMaster)
BlockMasterWorkerServiceHandler
.blockMaster
- the BlockMaster
the handler uses internallypublic void blockHeartbeat(BlockHeartbeatPRequest request, io.grpc.stub.StreamObserver<BlockHeartbeatPResponse> responseObserver)
BlockMasterWorkerServiceGrpc.AsyncService
Periodic block worker heartbeat returns an optional command for the block worker to execute.
public void commitBlock(CommitBlockPRequest request, io.grpc.stub.StreamObserver<CommitBlockPResponse> responseObserver)
BlockMasterWorkerServiceGrpc.AsyncService
Marks the given block as committed.
public void getWorkerId(GetWorkerIdPRequest request, io.grpc.stub.StreamObserver<GetWorkerIdPResponse> responseObserver)
BlockMasterWorkerServiceGrpc.AsyncService
Returns a worker id for the given network address.
public void requestRegisterLease(GetRegisterLeasePRequest request, io.grpc.stub.StreamObserver<GetRegisterLeasePResponse> responseObserver)
BlockMasterWorkerServiceGrpc.AsyncService
Requests a lease for registration
public void registerWorker(RegisterWorkerPRequest request, io.grpc.stub.StreamObserver<RegisterWorkerPResponse> responseObserver)
BlockMasterWorkerServiceGrpc.AsyncService
Registers a worker.
public io.grpc.stub.StreamObserver<RegisterWorkerPRequest> registerWorkerStream(io.grpc.stub.StreamObserver<RegisterWorkerPResponse> responseObserver)
BlockMasterWorkerServiceGrpc.AsyncService
Registers a worker in a streaming way
public void notifyWorkerId(NotifyWorkerIdPRequest request, io.grpc.stub.StreamObserver<NotifyWorkerIdPResponse> responseObserver)
BlockMasterWorkerServiceGrpc.AsyncService
Notify all masters about the worker ID.
Copyright © 2023. All Rights Reserved.