Package org.apache.solr.rest
Class ManagedResourceStorage.ZooKeeperStorageIO
- java.lang.Object
-
- org.apache.solr.rest.ManagedResourceStorage.ZooKeeperStorageIO
-
- All Implemented Interfaces:
ManagedResourceStorage.StorageIO
- Enclosing class:
- ManagedResourceStorage
public static class ManagedResourceStorage.ZooKeeperStorageIO extends Object implements ManagedResourceStorage.StorageIO
ZooKeeper based storage implementation that uses the SolrZkClient provided by the CoreContainer.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
retryOnConnLoss
protected org.apache.solr.common.cloud.SolrZkClient
zkClient
protected String
znodeBase
-
Constructor Summary
Constructors Constructor Description ZooKeeperStorageIO(org.apache.solr.common.cloud.SolrZkClient zkClient, String znodeBase)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(SolrResourceLoader loader, org.apache.solr.common.util.NamedList<String> initArgs)
boolean
delete(String storedResourceId)
boolean
exists(String storedResourceId)
String
getInfo()
protected String
getZnodeForResource(String storedResourceId)
Returns the Znode for the given storedResourceId by combining it with the znode base.InputStream
openInputStream(String storedResourceId)
OutputStream
openOutputStream(String storedResourceId)
-
-
-
Field Detail
-
zkClient
protected org.apache.solr.common.cloud.SolrZkClient zkClient
-
znodeBase
protected String znodeBase
-
retryOnConnLoss
protected boolean retryOnConnLoss
-
-
Constructor Detail
-
ZooKeeperStorageIO
public ZooKeeperStorageIO(org.apache.solr.common.cloud.SolrZkClient zkClient, String znodeBase)
-
-
Method Detail
-
configure
public void configure(SolrResourceLoader loader, org.apache.solr.common.util.NamedList<String> initArgs) throws org.apache.solr.common.SolrException
- Specified by:
configure
in interfaceManagedResourceStorage.StorageIO
- Throws:
org.apache.solr.common.SolrException
-
exists
public boolean exists(String storedResourceId) throws IOException
- Specified by:
exists
in interfaceManagedResourceStorage.StorageIO
- Throws:
IOException
-
openInputStream
public InputStream openInputStream(String storedResourceId) throws IOException
- Specified by:
openInputStream
in interfaceManagedResourceStorage.StorageIO
- Throws:
IOException
-
openOutputStream
public OutputStream openOutputStream(String storedResourceId) throws IOException
- Specified by:
openOutputStream
in interfaceManagedResourceStorage.StorageIO
- Throws:
IOException
-
getZnodeForResource
protected String getZnodeForResource(String storedResourceId)
Returns the Znode for the given storedResourceId by combining it with the znode base.
-
delete
public boolean delete(String storedResourceId) throws IOException
- Specified by:
delete
in interfaceManagedResourceStorage.StorageIO
- Throws:
IOException
-
getInfo
public String getInfo()
- Specified by:
getInfo
in interfaceManagedResourceStorage.StorageIO
-
-