public class ZkCmdExecutor extends Object
Constructor and Description |
---|
ZkCmdExecutor() |
Modifier and Type | Method and Description |
---|---|
void |
ensureExists(String path,
byte[] data,
org.apache.zookeeper.CreateMode createMode,
SolrZkClient zkClient) |
void |
ensureExists(String path,
SolrZkClient zkClient) |
List<org.apache.zookeeper.data.ACL> |
getAcl() |
long |
getRetryDelay() |
protected void |
retryDelay(int attemptCount)
Performs a retry delay if this is not the first attempt
|
<T> T |
retryOperation(ZkOperation operation)
Perform the given operation, retrying if the connection fails
|
void |
setAcl(List<org.apache.zookeeper.data.ACL> acl) |
void |
setRetryDelay(long retryDelay) |
public List<org.apache.zookeeper.data.ACL> getAcl()
public void setAcl(List<org.apache.zookeeper.data.ACL> acl)
public long getRetryDelay()
public void setRetryDelay(long retryDelay)
public <T> T retryOperation(ZkOperation operation) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void ensureExists(String path, SolrZkClient zkClient) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void ensureExists(String path, byte[] data, org.apache.zookeeper.CreateMode createMode, SolrZkClient zkClient) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
protected void retryDelay(int attemptCount) throws InterruptedException
attemptCount
- the number of the attempts performed so farInterruptedException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.