Package org.apache.bookkeeper.discover
Class ZKRegistrationClient.WatchTask
- java.lang.Object
-
- org.apache.bookkeeper.discover.ZKRegistrationClient.WatchTask
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Runnable
,java.util.function.BiConsumer<Versioned<java.util.Set<BookieId>>,java.lang.Throwable>
,org.apache.zookeeper.Watcher
- Enclosing class:
- ZKRegistrationClient
class ZKRegistrationClient.WatchTask extends java.lang.Object implements java.lang.Runnable, org.apache.zookeeper.Watcher, java.util.function.BiConsumer<Versioned<java.util.Set<BookieId>>,java.lang.Throwable>, java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description WatchTask(java.lang.String regPath, java.util.concurrent.CompletableFuture<java.lang.Void> firstRunFuture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Versioned<java.util.Set<BookieId>> bookieSet, java.lang.Throwable throwable)
boolean
addListener(RegistrationClient.RegistrationListener listener)
void
close()
int
getNumListeners()
(package private) boolean
isClosed()
void
process(org.apache.zookeeper.WatchedEvent event)
boolean
removeListener(RegistrationClient.RegistrationListener listener)
void
run()
(package private) void
watch()
-
-
-
Method Detail
-
getNumListeners
public int getNumListeners()
-
addListener
public boolean addListener(RegistrationClient.RegistrationListener listener)
-
removeListener
public boolean removeListener(RegistrationClient.RegistrationListener listener)
-
watch
void watch()
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
accept
public void accept(Versioned<java.util.Set<BookieId>> bookieSet, java.lang.Throwable throwable)
-
process
public void process(org.apache.zookeeper.WatchedEvent event)
- Specified by:
process
in interfaceorg.apache.zookeeper.Watcher
-
isClosed
boolean isClosed()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-