Class EtcdSessionWatcher

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class EtcdSessionWatcher
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Monitor the ETCd session state every few seconds and send notifications.
    • Constructor Summary

      Constructors 
      Constructor Description
      EtcdSessionWatcher​(io.etcd.jetcd.Client client, long sessionTimeoutMillis, java.util.function.Consumer<SessionEvent> sessionListener)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EtcdSessionWatcher

        public EtcdSessionWatcher​(io.etcd.jetcd.Client client,
                                  long sessionTimeoutMillis,
                                  java.util.function.Consumer<SessionEvent> sessionListener)
    • Method Detail

      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception