Package org.apache.solr.schema
Class ZkIndexSchemaReader
java.lang.Object
org.apache.solr.schema.ZkIndexSchemaReader
- All Implemented Interfaces:
org.apache.curator.framework.state.ConnectionStateListener,org.apache.solr.common.cloud.OnReconnect
Keeps a ManagedIndexSchema up-to-date when changes are made to the serialized managed schema in
ZooKeeper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWatches for schema changes and triggers updates in the ZkIndexSchemaReader. -
Constructor Summary
ConstructorsConstructorDescriptionZkIndexSchemaReader(ManagedIndexSchemaFactory managedIndexSchemaFactory, SolrCore solrCore) -
Method Summary
Modifier and TypeMethodDescriptionCreates a schema watcher and returns it for controlling purposes.booleaninthashCode()voidCalled after a ZooKeeper session expiration occurs; need to re-create the watcher and update the current schema from ZooKeeper.refreshSchemaFromZk(int expectedZkVersion) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.curator.framework.state.ConnectionStateListener
doNotProxyMethods inherited from interface org.apache.solr.common.cloud.OnReconnect
stateChanged
-
Constructor Details
-
ZkIndexSchemaReader
-
-
Method Details
-
getSchemaUpdateLock
-
createSchemaWatcher
Creates a schema watcher and returns it for controlling purposes.- Returns:
- the registered ZkIndexSchemaReader.SchemaWatcher.
-
refreshSchemaFromZk
public ManagedIndexSchema refreshSchemaFromZk(int expectedZkVersion) throws org.apache.zookeeper.KeeperException, InterruptedException - Throws:
org.apache.zookeeper.KeeperExceptionInterruptedException
-
onReconnect
public void onReconnect()Called after a ZooKeeper session expiration occurs; need to re-create the watcher and update the current schema from ZooKeeper.- Specified by:
onReconnectin interfaceorg.apache.solr.common.cloud.OnReconnect
-
getUniqueCoreId
-
toString
-
hashCode
public int hashCode() -
equals
-