private abstract class ReadOnlyZKClient.ZKTask<T> extends ReadOnlyZKClient.Task
Modifier and Type | Field and Description |
---|---|
private CompletableFuture<T> |
future |
private String |
operationType |
protected String |
path |
private int |
retries |
time
Modifier | Constructor and Description |
---|---|
protected |
ZKTask(String path,
CompletableFuture<T> future,
String operationType) |
Modifier and Type | Method and Description |
---|---|
void |
closed(IOException e) |
void |
connectFailed(Exception e) |
boolean |
delay(long intervalMs,
int maxRetries) |
protected abstract void |
doExec(org.apache.zookeeper.ZooKeeper zk) |
void |
exec(org.apache.zookeeper.ZooKeeper zk) |
boolean |
needZk() |
protected void |
onComplete(org.apache.zookeeper.ZooKeeper zk,
int rc,
T ret,
boolean errorIfNoNode) |
compareTo, getDelay
private final CompletableFuture<T> future
private final String operationType
private int retries
protected ZKTask(String path, CompletableFuture<T> future, String operationType)
protected final void onComplete(org.apache.zookeeper.ZooKeeper zk, int rc, T ret, boolean errorIfNoNode)
public boolean needZk()
needZk
in class ReadOnlyZKClient.Task
protected abstract void doExec(org.apache.zookeeper.ZooKeeper zk)
public final void exec(org.apache.zookeeper.ZooKeeper zk)
exec
in class ReadOnlyZKClient.Task
public boolean delay(long intervalMs, int maxRetries)
public void connectFailed(Exception e)
connectFailed
in class ReadOnlyZKClient.Task
public void closed(IOException e)
closed
in class ReadOnlyZKClient.Task
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.