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 and Description
    --- | ---
    `protected boolean` | `retryOnConnLoss`
    `protected SolrZkClient` | `zkClient`
    `protected String` | `znodeBase`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZooKeeperStorageIO(SolrZkClient zkClient, String znodeBase)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(SolrResourceLoader loader, 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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### zkClient

          protected SolrZkClient zkClient

    - #### znodeBase

          protected String znodeBase

    - #### retryOnConnLoss

          protected boolean retryOnConnLoss

  - ### Constructor Detail

    - #### ZooKeeperStorageIO

          public ZooKeeperStorageIO(SolrZkClient zkClient,
                                    String znodeBase)

  - ### Method Detail

    - #### configure

          public void configure(SolrResourceLoader loader,
                                NamedList<String> initArgs)
                         throws SolrException

      Specified by:
        `configure` in interface `ManagedResourceStorage.StorageIO`
      Throws:
        `SolrException`

    - #### exists

          public boolean exists(String storedResourceId)
                         throws IOException

      Specified by:
        `exists` in interface `ManagedResourceStorage.StorageIO`
      Throws:
        `IOException`

    - #### openInputStream

          public InputStream openInputStream(String storedResourceId)
                                      throws IOException

      Specified by:
        `openInputStream` in interface `ManagedResourceStorage.StorageIO`
      Throws:
        `IOException`

    - #### openOutputStream

          public OutputStream openOutputStream(String storedResourceId)
                                        throws IOException

      Specified by:
        `openOutputStream` in interface `ManagedResourceStorage.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 interface `ManagedResourceStorage.StorageIO`
      Throws:
        `IOException`

    - #### getInfo

          public String getInfo()

      Specified by:
        `getInfo` in interface `ManagedResourceStorage.StorageIO`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.