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 booleanretryOnConnLossprotected org.apache.solr.common.cloud.SolrZkClientzkClientprotected StringznodeBase
-
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 voidconfigure(SolrResourceLoader loader, org.apache.solr.common.util.NamedList<String> initArgs)booleandelete(String storedResourceId)booleanexists(String storedResourceId)StringgetInfo()protected StringgetZnodeForResource(String storedResourceId)Returns the Znode for the given storedResourceId by combining it with the znode base.InputStreamopenInputStream(String storedResourceId)OutputStreamopenOutputStream(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:
configurein interfaceManagedResourceStorage.StorageIO- Throws:
org.apache.solr.common.SolrException
-
exists
public boolean exists(String storedResourceId) throws IOException
- Specified by:
existsin interfaceManagedResourceStorage.StorageIO- Throws:
IOException
-
openInputStream
public InputStream openInputStream(String storedResourceId) throws IOException
- Specified by:
openInputStreamin interfaceManagedResourceStorage.StorageIO- Throws:
IOException
-
openOutputStream
public OutputStream openOutputStream(String storedResourceId) throws IOException
- Specified by:
openOutputStreamin 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:
deletein interfaceManagedResourceStorage.StorageIO- Throws:
IOException
-
getInfo
public String getInfo()
- Specified by:
getInfoin interfaceManagedResourceStorage.StorageIO
-
-