Package io.etcd.jetcd.api
Interface WatchResponseOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
WatchResponse,WatchResponse.Builder
public interface WatchResponseOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleangetCanceled()canceled is set to true if the response is for a cancel watch request.java.lang.StringgetCancelReason()cancel_reason indicates the reason for canceling the watcher.com.google.protobuf.ByteStringgetCancelReasonBytes()cancel_reason indicates the reason for canceling the watcher.longgetCompactRevision()compact_revision is set to the minimum index if a watcher tries to watch at a compacted index.booleangetCreated()created is set to true if the response is for a create watch request.EventgetEvents(int index)repeated .mvccpb.Event events = 11;intgetEventsCount()repeated .mvccpb.Event events = 11;java.util.List<Event>getEventsList()repeated .mvccpb.Event events = 11;EventOrBuildergetEventsOrBuilder(int index)repeated .mvccpb.Event events = 11;java.util.List<? extends EventOrBuilder>getEventsOrBuilderList()repeated .mvccpb.Event events = 11;ResponseHeadergetHeader().etcdserverpb.ResponseHeader header = 1;ResponseHeaderOrBuildergetHeaderOrBuilder().etcdserverpb.ResponseHeader header = 1;longgetWatchId()watch_id is the ID of the watcher that corresponds to the response.booleanhasHeader().etcdserverpb.ResponseHeader header = 1;-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
hasHeader
boolean hasHeader()
.etcdserverpb.ResponseHeader header = 1;- Returns:
- Whether the header field is set.
-
getHeader
ResponseHeader getHeader()
.etcdserverpb.ResponseHeader header = 1;- Returns:
- The header.
-
getHeaderOrBuilder
ResponseHeaderOrBuilder getHeaderOrBuilder()
.etcdserverpb.ResponseHeader header = 1;
-
getWatchId
long getWatchId()
watch_id is the ID of the watcher that corresponds to the response.
int64 watch_id = 2;- Returns:
- The watchId.
-
getCreated
boolean getCreated()
created is set to true if the response is for a create watch request. The client should record the watch_id and expect to receive events for the created watcher from the same stream. All events sent to the created watcher will attach with the same watch_id.
bool created = 3;- Returns:
- The created.
-
getCanceled
boolean getCanceled()
canceled is set to true if the response is for a cancel watch request. No further events will be sent to the canceled watcher.
bool canceled = 4;- Returns:
- The canceled.
-
getCompactRevision
long getCompactRevision()
compact_revision is set to the minimum index if a watcher tries to watch at a compacted index. This happens when creating a watcher at a compacted revision or the watcher cannot catch up with the progress of the key-value store. The client should treat the watcher as canceled and should not try to create any watcher with the same start_revision again.
int64 compact_revision = 5;- Returns:
- The compactRevision.
-
getCancelReason
java.lang.String getCancelReason()
cancel_reason indicates the reason for canceling the watcher.
string cancel_reason = 6;- Returns:
- The cancelReason.
-
getCancelReasonBytes
com.google.protobuf.ByteString getCancelReasonBytes()
cancel_reason indicates the reason for canceling the watcher.
string cancel_reason = 6;- Returns:
- The bytes for cancelReason.
-
getEventsList
java.util.List<Event> getEventsList()
repeated .mvccpb.Event events = 11;
-
getEvents
Event getEvents(int index)
repeated .mvccpb.Event events = 11;
-
getEventsCount
int getEventsCount()
repeated .mvccpb.Event events = 11;
-
getEventsOrBuilderList
java.util.List<? extends EventOrBuilder> getEventsOrBuilderList()
repeated .mvccpb.Event events = 11;
-
getEventsOrBuilder
EventOrBuilder getEventsOrBuilder(int index)
repeated .mvccpb.Event events = 11;
-
-