Interface SnapshotWatcher<T>

All Known Implementing Classes:
ClusterRoot, ListenerRoot
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@UnstableApi @FunctionalInterface public interface SnapshotWatcher<T>
A watcher implementation which waits for updates on an xDS snapshot.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onError(XdsType type, io.grpc.Status status)
    Invoked when an unexpected error occurs while processing a resource.
    default void
    onMissing(XdsType type, String resourceName)
    Invoked when a resource is deemed not to exist.
    void
    snapshotUpdated(T newSnapshot)
    Invoked when a full snapshot is updated.
  • Method Details

    • snapshotUpdated

      void snapshotUpdated(T newSnapshot)
      Invoked when a full snapshot is updated.
    • onMissing

      default void onMissing(XdsType type, String resourceName)
      Invoked when a resource is deemed not to exist. This can either be due to a timeout on a watch, or the xDS control plane explicitly signalling a resource is missing.
    • onError

      default void onError(XdsType type, io.grpc.Status status)
      Invoked when an unexpected error occurs while processing a resource.