Interface DistribStateManager
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.solr.common.SolrCloseable
- All Known Implementing Classes:
ZkDistribStateManager
public interface DistribStateManager
extends org.apache.solr.common.SolrCloseable
This interface represents a distributed state repository.
-
Method Summary
Modifier and TypeMethodDescriptioncreateData(String path, byte[] data, org.apache.zookeeper.CreateMode mode) Create data (leaf) node at specified path.default VersionedDatadefault org.apache.solr.common.cloud.DocCollection.PrsSuppliergetPrsSupplier(String collName) default org.apache.solr.common.cloud.PerReplicaStatesgetReplicaStates(String path) booleanList a subtree including the root path, using breadth-first traversal.voidvoidmakePath(String path, byte[] data, org.apache.zookeeper.CreateMode createMode, boolean failOnExists) List<org.apache.curator.framework.api.transaction.CuratorTransactionResult> voidremoveData(String path, int version) default voidremoveRecursively(String root, boolean ignoreMissing, boolean includeRoot) Remove data recursively.voidMethods inherited from interface org.apache.solr.common.SolrCloseable
isClosed
-
Method Details
-
hasData
boolean hasData(String path) throws IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
IOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
listData
List<String> listData(String path) throws NoSuchElementException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
NoSuchElementExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
listData
List<String> listData(String path, org.apache.zookeeper.Watcher watcher) throws NoSuchElementException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
NoSuchElementExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
getData
VersionedData getData(String path, org.apache.zookeeper.Watcher watcher) throws NoSuchElementException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
NoSuchElementExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
getData
default VersionedData getData(String path) throws NoSuchElementException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
NoSuchElementExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
getJson
Map<String,Object> getJson(String path) throws InterruptedException, IOException, org.apache.zookeeper.KeeperException - Throws:
InterruptedExceptionIOExceptionorg.apache.zookeeper.KeeperException
-
makePath
void makePath(String path) throws AlreadyExistsException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
AlreadyExistsExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
makePath
void makePath(String path, byte[] data, org.apache.zookeeper.CreateMode createMode, boolean failOnExists) throws AlreadyExistsException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
AlreadyExistsExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
createData
String createData(String path, byte[] data, org.apache.zookeeper.CreateMode mode) throws AlreadyExistsException, IOException, org.apache.zookeeper.KeeperException, InterruptedException Create data (leaf) node at specified path.- Parameters:
path- base path name of the node.data- data to be stored.mode- creation mode.- Returns:
- actual path of the node - in case of sequential nodes this will differ from the base path because of the appended sequence number.
- Throws:
AlreadyExistsExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
removeData
void removeData(String path, int version) throws NoSuchElementException, IOException, NotEmptyException, org.apache.zookeeper.KeeperException, InterruptedException, BadVersionException - Throws:
NoSuchElementExceptionIOExceptionNotEmptyExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionBadVersionException
-
setData
void setData(String path, byte[] data, int version) throws BadVersionException, NoSuchElementException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
BadVersionExceptionNoSuchElementExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
multi
List<org.apache.curator.framework.api.transaction.CuratorTransactionResult> multi(List<SolrZkClient.CuratorOpBuilder> ops) throws BadVersionException, NoSuchElementException, AlreadyExistsException, IOException, org.apache.zookeeper.KeeperException, InterruptedException - Throws:
BadVersionExceptionNoSuchElementExceptionAlreadyExistsExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
listTree
default List<String> listTree(String root) throws NoSuchElementException, IOException, org.apache.zookeeper.KeeperException, InterruptedException List a subtree including the root path, using breadth-first traversal.- Parameters:
root- root path- Returns:
- list of full paths, with the root path being the first element
- Throws:
NoSuchElementExceptionIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedException
-
getReplicaStates
default org.apache.solr.common.cloud.PerReplicaStates getReplicaStates(String path) throws org.apache.zookeeper.KeeperException, InterruptedException - Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
getPrsSupplier
-
removeRecursively
default void removeRecursively(String root, boolean ignoreMissing, boolean includeRoot) throws NoSuchElementException, IOException, NotEmptyException, org.apache.zookeeper.KeeperException, InterruptedException, BadVersionException Remove data recursively.- Parameters:
root- root pathignoreMissing- ignore errors if root or any children path is missingincludeRoot- when true delete also the root path- Throws:
NoSuchElementExceptionIOExceptionNotEmptyExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionBadVersionException
-