use of alluxio.hub.proto.ApplyMountPointResponse in project alluxio by Alluxio.
the class ManagerProcessContext method startApplyMountPointListener.
/**
* Starts a request stream observer for {@link HostedManagerServiceGrpc} ApplyMountPoint
* RPC calls.
*/
public void startApplyMountPointListener() {
HostedManagerServiceGrpc.HostedManagerServiceStub asyncStub = getHostedAsyncStub();
RequestStreamObserver requestObserver = new RequestStreamObserver<ApplyMountPointRequest, ApplyMountPointResponse>() {
@Override
public ApplyMountPointResponse exec(ApplyMountPointRequest req) {
return ApplyMountPointResponse.newBuilder().setHubMetadata(mHubMetadata).setPayload(applyMount(req)).build();
}
@Override
public void restart() {
startApplyMountPointListener();
}
@Override
public void handleError(String message, Throwable t) {
handleStatusRuntimeException(message, t);
}
};
StreamObserver<ApplyMountPointResponse> responseObserver = asyncStub.applyMountPoint(requestObserver);
requestObserver.start(responseObserver, ApplyMountPointResponse.newBuilder().setHubMetadata(mHubMetadata).build());
LOG.info("Started ApplyMountPoint async listener", asyncStub);
}
Aggregations