public class WorkerRegisterContext extends Object implements Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
static WorkerRegisterContext |
create(BlockMaster blockMaster,
long workerId,
io.grpc.stub.StreamObserver<RegisterWorkerPRequest> workerRequestObserver)
Creates a new
WorkerRegisterContext . |
long |
getWorkerId()
Getter for worker ID.
|
MasterWorkerInfo |
getWorkerInfo() |
boolean |
isOpen()
Checks whether the stream is still open.
|
public long getWorkerId()
public boolean isOpen()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public static WorkerRegisterContext create(BlockMaster blockMaster, long workerId, io.grpc.stub.StreamObserver<RegisterWorkerPRequest> workerRequestObserver) throws NotFoundException
WorkerRegisterContext
.blockMaster
- the block masterworkerId
- the worker IDworkerRequestObserver
- receives requests from the workerWorkerRegisterContext
NotFoundException
public MasterWorkerInfo getWorkerInfo()
Copyright © 2023. All Rights Reserved.