use of io.pravega.shared.protocol.netty.WireCommands.GetStreamSegmentInfo in project pravega by pravega.
the class SegmentMetadataClientImpl method getStreamSegmentInfo.
@VisibleForTesting
CompletableFuture<StreamSegmentInfo> getStreamSegmentInfo() {
log.debug("Getting segment info for segment: {}", segmentId);
RawClient connection = getConnection();
long requestId = connection.getFlow().getNextSequenceNumber();
return tokenProvider.retrieveToken().thenCompose(token -> connection.sendRequest(requestId, new GetStreamSegmentInfo(requestId, segmentId.getScopedName(), token))).thenApply(r -> transformReply(r, StreamSegmentInfo.class));
}
Aggregations