Class Policy
- java.lang.Object
-
- org.apache.solr.client.solrj.cloud.autoscaling.Policy
-
- All Implemented Interfaces:
MapSerializable,MapWriter,NavigableObject
public class Policy extends Object implements MapWriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPolicy.Sessionstatic classPolicy.SortParam-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Field Summary
Fields Modifier and Type Field Description static StringANYstatic StringCLUSTER_POLICYstatic StringCLUSTER_PREFERENCESstatic List<Preference>DEFAULT_PREFERENCESstatic StringEACHstatic Set<String>GLOBAL_ONLY_TAGSstatic StringPOLICIESstatic StringPOLICY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,List<Clause>>clausesFromMap(Map<String,List<Map<String,Object>>> map, List<String> newParams)Policy.SessioncreateSession(SolrCloudManager cloudManager)booleanequals(Object o)List<Clause>getClusterPolicy()List<Preference>getClusterPreferences()List<String>getParams()Map<String,List<Clause>>getPolicies()booleanisEmpty()booleanisEmptyPreferences()static List<Clause>mergePolicies(String coll, List<Clause> collPolicy, List<Clause> globalPolicy)StringtoString()PolicywithClusterPolicy(List<Clause> clusterPolicy)PolicywithClusterPreferences(List<Preference> clusterPreferences)PolicywithParams(List<String> params)PolicywithPolicies(Map<String,List<Clause>> policies)voidwriteMap(MapWriter.EntryWriter ew)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr
-
-
-
-
Field Detail
-
POLICY
public static final String POLICY
- See Also:
- Constant Field Values
-
EACH
public static final String EACH
- See Also:
- Constant Field Values
-
ANY
public static final String ANY
- See Also:
- Constant Field Values
-
POLICIES
public static final String POLICIES
- See Also:
- Constant Field Values
-
CLUSTER_POLICY
public static final String CLUSTER_POLICY
- See Also:
- Constant Field Values
-
CLUSTER_PREFERENCES
public static final String CLUSTER_PREFERENCES
- See Also:
- Constant Field Values
-
DEFAULT_PREFERENCES
public static final List<Preference> DEFAULT_PREFERENCES
-
-
Method Detail
-
withClusterPreferences
public Policy withClusterPreferences(List<Preference> clusterPreferences)
-
getClusterPreferences
public List<Preference> getClusterPreferences()
-
writeMap
public void writeMap(MapWriter.EntryWriter ew) throws IOException
- Specified by:
writeMapin interfaceMapWriter- Throws:
IOException
-
clausesFromMap
public static Map<String,List<Clause>> clausesFromMap(Map<String,List<Map<String,Object>>> map, List<String> newParams)
-
createSession
public Policy.Session createSession(SolrCloudManager cloudManager)
-
mergePolicies
public static List<Clause> mergePolicies(String coll, List<Clause> collPolicy, List<Clause> globalPolicy)
-
isEmpty
public boolean isEmpty()
-
isEmptyPreferences
public boolean isEmptyPreferences()
- Returns:
- true if no preferences were specified by the user, false otherwise
-
-