org.apache.solr.schema

## Class ZkIndexSchemaReader

- java.lang.Object
- - org.apache.solr.schema.ZkIndexSchemaReader

- All Implemented Interfaces:
    OnReconnect

      public class ZkIndexSchemaReader
      extends Object
      implements OnReconnect

  Keeps a ManagedIndexSchema up-to-date when changes are made to the serialized managed schema in ZooKeeper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZkIndexSchemaReader(ManagedIndexSchemaFactory managedIndexSchemaFactory, SolrCore solrCore)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `command()` Called after a ZooKeeper session expiration occurs; need to re-create the watcher and update the current schema from ZooKeeper.
    `void` | `createSchemaWatcher()`
    `boolean` | `equals(Object other)`
    `Object` | `getSchemaUpdateLock()`
    `String` | `getUniqueCoreId()`
    `int` | `hashCode()`
    `ManagedIndexSchema` | `refreshSchemaFromZk(int expectedZkVersion)`
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ZkIndexSchemaReader

          public ZkIndexSchemaReader(ManagedIndexSchemaFactory managedIndexSchemaFactory,
                                     SolrCore solrCore)

  - ### Method Detail

    - #### getSchemaUpdateLock

          public Object getSchemaUpdateLock()

    - #### createSchemaWatcher

          public void createSchemaWatcher()

    - #### refreshSchemaFromZk

          public ManagedIndexSchema refreshSchemaFromZk(int expectedZkVersion)
                                                 throws org.apache.zookeeper.KeeperException,
                                                        InterruptedException

      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

    - #### command

          public void command()

      Called after a ZooKeeper session expiration occurs; need to re-create the watcher and update the current schema from ZooKeeper.
      Specified by:
        `command` in interface `OnReconnect`

    - #### getUniqueCoreId

          public String getUniqueCoreId()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

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