public <T> CompletableFuture<Entry<T>> watchFile(Repository repo, Revision lastKnownRevision,
                                                     Query<T> query, long timeoutMillis) {
        final CompletableFuture<Entry<T>> result = repo.watch(lastKnownRevision, query);
        if (result.isDone()) {
            return result;
        }

        scheduleTimeout(result, timeoutMillis);
        return result;
    }
public < T > CompletableFuture < Entry < T > > watchFile ( Repository repo , Revision lastKnownRevision , Query < T > query , long timeoutMillis ) { final CompletableFuture < Entry < T > > result = repo . watch ( lastKnownRevision , query ) ; if ( result . isDone ( ) ) { return result ; } scheduleTimeout ( result , timeoutMillis ) ; return result ; }
Awaits and retrieves the latest revision of the commit that changed the file that matches the specified
{@link Query} since the specified {@code lastKnownRevision}. This will wait until the specified
{@code timeoutMillis} passes. If there's no change during the time, the returned future will be
exceptionally completed with the {@link CancellationException}.