Class SnitchContext
- java.lang.Object
- 
- org.apache.solr.common.cloud.rule.SnitchContext
 
- 
- All Implemented Interfaces:
- RemoteCallback
 
 public abstract class SnitchContext extends Object implements RemoteCallback This is the context provided to the snitches to interact with the system. This is a per-node-per-snitch instance.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSnitchContext.SnitchInfo
 - 
Field SummaryFields Modifier and Type Field Description ExceptionexceptionSnitchContext.SnitchInfosnitchInfo
 - 
Constructor SummaryConstructors Constructor Description SnitchContext(SnitchContext.SnitchInfo perSnitch, String node, Map<String,Object> session)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetErrMsg()StringgetNode()Map<String,Object>getNodeValues(String node, Collection<String> tags)Map<String,Object>getTags()abstract Map<?,?>getZkJson(String path)voidinvokeRemote(String node, ModifiableSolrParams params, String klas, RemoteCallback callback)Deprecated.voidremoteCallback(SnitchContext ctx, Map<String,Object> returnedVal)Objectretrieve(String s)voidstore(String s, Object val)
 
- 
- 
- 
Field Detail- 
snitchInfopublic final SnitchContext.SnitchInfo snitchInfo 
 - 
exceptionpublic Exception exception 
 
- 
 - 
Constructor Detail- 
SnitchContextpublic SnitchContext(SnitchContext.SnitchInfo perSnitch, String node, Map<String,Object> session) 
 
- 
 - 
Method Detail- 
getZkJsonpublic abstract Map<?,?> getZkJson(String path) throws org.apache.zookeeper.KeeperException, InterruptedException - Throws:
- org.apache.zookeeper.KeeperException
- InterruptedException
 
 - 
getNodepublic String getNode() 
 - 
invokeRemote@Deprecated public void invokeRemote(String node, ModifiableSolrParams params, String klas, RemoteCallback callback) Deprecated.make a call to solrnode/admin/cores with the given params and give a callback. This is designed to be asynchronous because the system would want to batch the calls made to any given node- Parameters:
- node- The node for which this call is made
- params- The params to be passed to the Snitch counterpart
- klas- The name of the class to be invoked in the remote node
- callback- The callback to be called when the response is obtained from remote node. If this is passed as null the entire response map will be added as tags
 
 - 
remoteCallbackpublic void remoteCallback(SnitchContext ctx, Map<String,Object> returnedVal) - Specified by:
- remoteCallbackin interface- RemoteCallback
 
 - 
getErrMsgpublic String getErrMsg() 
 
- 
 
-