Package com.linecorp.centraldogma.client
Class WatchRequest<T>
java.lang.Object
com.linecorp.centraldogma.client.WatchRequest<T>
Prepares to send a
CentralDogma.watchFile(String, String, Revision, Query, long, boolean)
request to the Central Dogma repository or create a new Watcher
.-
Method Summary
Modifier and TypeMethodDescriptionerrorOnEntryNotFound
(boolean errorOnEntryNotFound) Sets whether to throw anEntryNotFoundException
if the watch target does not exist.start()
Waits for the file matched by theQuery
to be changed since theRevision.HEAD
.Waits for the file matched by theQuery
to be changed since thelastKnownRevision
.timeoutMillis
(long timeoutMillis)
-
Method Details
-
timeout
-
timeoutMillis
-
errorOnEntryNotFound
Sets whether to throw anEntryNotFoundException
if the watch target does not exist. -
start
Waits for the file matched by theQuery
to be changed since theRevision.HEAD
. If no changes were made within thetimeoutMillis(long)
, the returnedCompletableFuture
will be completed withnull
.- Returns:
- the
Entry
which contains the latest knownQuery
result.null
if the file was not changed fortimeoutMillis(long)
milliseconds since the invocation of this method.EntryNotFoundException
is raised if the target does not exist.
-
start
Waits for the file matched by theQuery
to be changed since thelastKnownRevision
. If no changes were made within thetimeoutMillis(long)
, the returnedCompletableFuture
will be completed withnull
.- Returns:
- the
Entry
which contains the latest knownQuery
result.null
if the file was not changed fortimeoutMillis(long)
milliseconds since the invocation of this method.EntryNotFoundException
is raised if the target does not exist.
-