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 class
Policy.Session
static class
Policy.SortParam
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Field Summary
Fields Modifier and Type Field Description static String
ANY
static String
CLUSTER_POLICY
static String
CLUSTER_PREFERENCES
static List<Preference>
DEFAULT_PREFERENCES
static String
EACH
static Set<String>
GLOBAL_ONLY_TAGS
static String
POLICIES
static String
POLICY
-
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.Session
createSession(SolrCloudManager cloudManager)
boolean
equals(Object o)
List<Clause>
getClusterPolicy()
List<Preference>
getClusterPreferences()
List<String>
getParams()
Map<String,List<Clause>>
getPolicies()
boolean
isEmpty()
boolean
isEmptyPreferences()
static List<Clause>
mergePolicies(String coll, List<Clause> collPolicy, List<Clause> globalPolicy)
String
toString()
Policy
withClusterPolicy(List<Clause> clusterPolicy)
Policy
withClusterPreferences(List<Preference> clusterPreferences)
Policy
withParams(List<String> params)
Policy
withPolicies(Map<String,List<Clause>> policies)
void
writeMap(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:
writeMap
in 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
-
-