Package org.apache.solr.common.cloud
Class ZkCmdExecutor
java.lang.Object
org.apache.solr.common.cloud.ZkCmdExecutor
-
Constructor Summary
ConstructorsConstructorDescriptionZkCmdExecutor(int timeoutms) ZkCmdExecutor(int timeoutms, ConnectionManager.IsClosed isClosed) TODO: At this point, this should probably take a SolrZkClient in its constructor. -
Method Summary
Modifier and TypeMethodDescriptionlongprotected voidretryDelay(int attemptCount) Performs a retry delay if this is not the first attempt<T> TretryOperation(ZkOperation<T> operation) Perform the given operation, retrying if the connection failsvoidsetRetryDelay(long retryDelay)
-
Constructor Details
-
ZkCmdExecutor
public ZkCmdExecutor(int timeoutms) -
ZkCmdExecutor
TODO: At this point, this should probably take a SolrZkClient in its constructor.- Parameters:
timeoutms- the client timeout for the ZooKeeper clients that will be used with this class.
-
-
Method Details
-
getRetryDelay
public long getRetryDelay() -
setRetryDelay
public void setRetryDelay(long retryDelay) -
retryOperation
public <T> T retryOperation(ZkOperation<T> operation) throws org.apache.zookeeper.KeeperException, InterruptedException Perform the given operation, retrying if the connection fails- Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
retryDelay
Performs a retry delay if this is not the first attempt- Parameters:
attemptCount- the number of the attempts performed so far- Throws:
InterruptedException
-