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