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 static 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<Clause>
DEFAULT_CLUSTER_POLICY
static List<Map<String,Object>>
DEFAULT_CLUSTER_POLICY_JSON
static List<Preference>
DEFAULT_PREFERENCES
static String
EACH
static Set<String>
GLOBAL_ONLY_TAGS
static String
POLICIES
static String
POLICY
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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
-
DEFAULT_CLUSTER_POLICY_JSON
public static final List<Map<String,Object>> DEFAULT_CLUSTER_POLICY_JSON
-
-
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)
-
createSession
public Policy.Session createSession(SolrCloudManager cloudManager, org.apache.solr.client.solrj.cloud.autoscaling.Policy.Transaction tx)
-
mergePolicies
public static List<Clause> mergePolicies(String coll, List<Clause> collPolicy, List<Clause> globalPolicy)
-
getParams
public List<Pair<String,Variable.Type>> getParams()
-
getZkVersion
public int getZkVersion()
-
isEmpty
public boolean isEmpty()
-
hasEmptyPreferences
public boolean hasEmptyPreferences()
- Returns:
- true if no preferences were specified by the user, false otherwise
-
hasEmptyClusterPolicy
public boolean hasEmptyClusterPolicy()
- Returns:
- true if no cluster policy was specified by the user, false otherwise
-
-