long getEndOffsetForSegment ( Segment segment ) { return Optional . ofNullable ( sync . getState ( ) . getEndSegments ( ) . get ( segment ) ) . orElse ( Long . MAX_VALUE ) ; }
Fetch the configured end offset for a configured segment . If end offset is not configured return Long . MAX_VALUE .