Class WatchOption

java.lang.Object
io.etcd.jetcd.options.WatchOption

public final class WatchOption extends Object
The option for watch operation.
  • Field Details

  • Method Details

    • getEndKey

      public Optional<ByteSequence> getEndKey()
    • getRevision

      public long getRevision()
      Returns the revision to watch from.
      Returns:
      the revision.
    • isPrevKV

      public boolean isPrevKV()
      Whether created watcher gets the previous KV before the event happens.
      Returns:
      if true, watcher receives the previous KV before the event happens.
    • isProgressNotify

      public boolean isProgressNotify()
      Whether watcher server send periodic progress updates.
      Returns:
      if true, watcher server should send periodic progress updates.
    • isCreatedNotify

      public boolean isCreatedNotify()
      Whether watcher server send watch create event.
      Returns:
      if true, watcher server should send watch create event.
    • isNoPut

      public boolean isNoPut()
      Whether filter put event in server side.
      Returns:
      if true, filter put event in server side
    • isNoDelete

      public boolean isNoDelete()
      Whether filter delete event in server side.
      Returns:
      if true, filter delete event in server side
    • withRequireLeader

      public boolean withRequireLeader()
      If true, when creating the watch streaming stub, use the REQUIRED_LEADER Metadata annotation, which ensures the stream will error out if quorum is lost by the server the stream is connected to. This will make the watch fail with an error and finish. Without this option, a watch running against a server that is out of quorum simply goes silent.
      Returns:
      if true, use REQUIRE_LEADER metadata annotation for watch streams
    • isPrefix

      public boolean isPrefix()
    • newBuilder

      @Deprecated public static WatchOption.Builder newBuilder()
      Deprecated.
      Returns the builder.
      Returns:
      the builder
    • builder

      public static WatchOption.Builder builder()