Interface SharedInformer<T>

All Known Subinterfaces:
SharedIndexInformer<T>
All Known Implementing Classes:
DefaultSharedIndexInformer

public interface SharedInformer<T>
SharedInformer defines basic methods of an informer. This has been ported from official go client: https://github.com/kubernetes/client-go/blob/master/tools/cache/shared_informer.go
  • Method Details

    • addEventHandler

      void addEventHandler​(ResourceEventHandler<T> handler)
      Add event handler
      Parameters:
      handler - event handler
    • addEventHandlerWithResyncPeriod

      void addEventHandlerWithResyncPeriod​(ResourceEventHandler<T> handle, long resyncPeriod)
      Adds an event handler to the shared informer using the specified resync period. Events to a single handler are delivered sequentially, but there is no coordination between different handlers.
      Parameters:
      handle - the event handler
      resyncPeriod - the specific resync period
    • run

      void run()
      Starts the shared informer, which will be stopped until stop() is called.
    • stop

      void stop()
      Stops the shared informer.
    • hasSynced

      boolean hasSynced()
    • lastSyncResourceVersion

      String lastSyncResourceVersion()
      The resource version observed when last synced with the underlying store. The value returned is not synchronized with access to the underlying store and is not thread-safe.
      Returns:
      string value