/** * Returns the latest value of {@code watchFile()} result. * * @throws IllegalStateException if the value is not available yet. * Use {@link #awaitInitialValue(long, TimeUnit)} first or * add a listener using {@link #watch(BiConsumer)} instead. */ default T latestValue() { return latest().value(); }
@Override public void close() { instanceListWatcher.close(); } }
/** * Pushes the specified {@link Change}s to the repository. * * @return the {@link PushResult} which tells the {@link Revision} and timestamp of the new {@link Commit} */ default CompletableFuture<PushResult> push(String projectName, String repositoryName, Revision baseRevision, String summary, Iterable<? extends Change<?>> changes) { return push(projectName, repositoryName, baseRevision, summary, "", Markup.PLAINTEXT, changes); }
@Override @Nullable public <T> Object invoke(CentralDogmaBeanMethodHandler<T> handler, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { if (handler.watcher.initialValueFuture().isDone()) { return handler.watcher.latest().revision(); } else { return null; } } }
/** * Retrieves the history of the repository between two {@link Revision}s. This method is a shortcut of * {@code getHistory(projectName, repositoryName, from, to, "/**")} */ default CompletableFuture<List<Commit>> getHistory( String projectName, String repositoryName, Revision from, Revision to) { return getHistory(projectName, repositoryName, from, to, "/**"); }
/** * Sets the client to use TLS. */ public final B useTls() { return useTls(true); }
/** * Adds the host name or IP address of the Central Dogma Server and uses the default port number of * {@value #DEFAULT_PORT}. * * @param host the host name or IP address of the Central Dogma server */ public final B host(String host) { return host(host, DEFAULT_PORT); }
@Override @Nullable public <T> Object invoke(CentralDogmaBeanMethodHandler<T> handler, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { if (handler.watcher.initialValueFuture().isDone()) { return handler.watcher.latest().revision(); } else { return null; } } }
/** * Returns the latest value of {@code watchFile()} result. * * @throws IllegalStateException if the value is not available yet. * Use {@link #awaitInitialValue(long, TimeUnit)} first or * add a listener using {@link #watch(BiConsumer)} instead. */ default T latestValue() { return latest().value(); }
/** * Pushes the specified {@link Change}s to the repository. * * @return the {@link PushResult} which tells the {@link Revision} and timestamp of the new {@link Commit} */ default CompletableFuture<PushResult> push(String projectName, String repositoryName, Revision baseRevision, String summary, Iterable<? extends Change<?>> changes) { return push(projectName, repositoryName, baseRevision, summary, "", Markup.PLAINTEXT, changes); }
/** * Retrieves the history of the repository between two {@link Revision}s. This method is a shortcut of * {@code getHistory(projectName, repositoryName, from, to, "/**")}. Note that this method does not * retrieve the diffs but only metadata about the changes. * Use {@link #getDiff(String, String, Revision, Revision, Query)} or * {@link #getDiffs(String, String, Revision, Revision, String)} to retrieve the diffs. * * @return a {@link List} that contains the {@link Commit}s of the specified repository */ default CompletableFuture<List<Commit>> getHistory( String projectName, String repositoryName, Revision from, Revision to) { return getHistory(projectName, repositoryName, from, to, "/**"); }
@Override public void close() { instanceListWatcher.close(); } }
/** * Sets the client to use TLS. */ public final B useTls() { return useTls(true); }
/** * Adds the host name or IP address of the Central Dogma Server and uses the default port number of * {@value #DEFAULT_PORT}. * * @param host the host name or IP address of the Central Dogma server */ public final B host(String host) { return host(host, DEFAULT_PORT); }
@Override @Nullable public <T> Object invoke(CentralDogmaBeanMethodHandler<T> handler, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { if (handler.watcher.initialValueFuture().isDone()) { return handler.watcher.latest().revision(); } else { return null; } } }
/** * Returns the latest value of {@code watchFile()} result. * * @throws IllegalStateException if the value is not available yet. * Use {@link #awaitInitialValue(long, TimeUnit)} first or * add a listener using {@link #watch(BiConsumer)} instead. */ default T latestValue() { return latest().value(); }
/** * Pushes the specified {@link Change}s to the repository. */ default CompletableFuture<PushResult> push(String projectName, String repositoryName, Revision baseRevision, String summary, Iterable<? extends Change<?>> changes) { return push(projectName, repositoryName, baseRevision, summary, "", Markup.PLAINTEXT, changes); }
/** * Retrieves the history of the repository between two {@link Revision}s. This method is a shortcut of * {@code getHistory(projectName, repositoryName, from, to, "/**")}. Note that this method does not * retrieve the diffs but only metadata about the changes. * Use {@link #getDiff(String, String, Revision, Revision, Query)} or * {@link #getDiffs(String, String, Revision, Revision, String)} to retrieve the diffs. * * @return a {@link List} that contains the {@link Commit}s of the specified repository */ default CompletableFuture<List<Commit>> getHistory( String projectName, String repositoryName, Revision from, Revision to) { return getHistory(projectName, repositoryName, from, to, "/**"); }
/** * Sets the client to use TLS. */ public final B useTls() { return useTls(true); }
/** * Adds the host name or IP address of the Central Dogma Server and uses the default port number of * {@value #DEFAULT_PORT}. * * @param host the host name or IP address of the Central Dogma server */ public final B host(String host) { return host(host, DEFAULT_PORT); }