FederationPolicyManagerHashBroadcastPolicyManager, HomePolicyManager, PriorityBroadcastPolicyManager, RejectAllPolicyManager, UniformBroadcastPolicyManager, WeightedHomePolicyManager, WeightedLocalityPolicyManagerpublic abstract class AbstractPolicyManager extends java.lang.Object implements FederationPolicyManager
| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.Class |
amrmProxyFederationPolicy |
|
static org.slf4j.Logger |
LOG |
|
protected java.lang.Class |
routerFederationPolicy |
| Constructor | Description |
|---|---|
AbstractPolicyManager() |
| Modifier and Type | Method | Description |
|---|---|---|
FederationAMRMProxyPolicy |
getAMRMPolicy(FederationPolicyInitializationContext federationPolicyContext,
FederationAMRMProxyPolicy oldInstance) |
This default implementation validates the
FederationPolicyInitializationContext,
then checks whether it needs to reinstantiate the class (null or
mismatching type), and reinitialize the policy. |
java.lang.String |
getQueue() |
This method returns the queue this policy is configured for.
|
FederationRouterPolicy |
getRouterPolicy(FederationPolicyInitializationContext federationPolicyContext,
FederationRouterPolicy oldInstance) |
This default implementation validates the
FederationPolicyInitializationContext,
then checks whether it needs to reinstantiate the class (null or
mismatching type), and reinitialize the policy. |
abstract WeightedPolicyInfo |
getWeightedPolicyInfo() |
We get the WeightedPolicyInfo of the subCluster.
|
SubClusterPolicyConfiguration |
serializeConf() |
This method is invoked to derive a
SubClusterPolicyConfiguration. |
void |
setQueue(java.lang.String queue) |
This methods provides a setter for the queue this policy is specified for.
|
abstract void |
setWeightedPolicyInfo(WeightedPolicyInfo weightedPolicyInfo) |
We set the WeightedPolicyInfo of the subCluster.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSupportWeightedPolicyInfoprotected java.lang.Class routerFederationPolicy
protected java.lang.Class amrmProxyFederationPolicy
public static final org.slf4j.Logger LOG
public FederationAMRMProxyPolicy getAMRMPolicy(FederationPolicyInitializationContext federationPolicyContext, FederationAMRMProxyPolicy oldInstance) throws FederationPolicyInitializationException
FederationPolicyInitializationContext,
then checks whether it needs to reinstantiate the class (null or
mismatching type), and reinitialize the policy.getAMRMPolicy in interface FederationPolicyManagerfederationPolicyContext - the current contextoldInstance - the existing (possibly null) instance.FederationAMRMProxyPolicy
instanceFederationPolicyInitializationException - if the reinitialization is
not valid, and ensure
previous state is preservedpublic FederationRouterPolicy getRouterPolicy(FederationPolicyInitializationContext federationPolicyContext, FederationRouterPolicy oldInstance) throws FederationPolicyInitializationException
FederationPolicyInitializationContext,
then checks whether it needs to reinstantiate the class (null or
mismatching type), and reinitialize the policy.getRouterPolicy in interface FederationPolicyManagerfederationPolicyContext - the current contextoldInstance - the existing (possibly null) instance.FederationRouterPolicy
instanceFederationPolicyInitializationException - if the reinitialization is
not valid, and ensure
previous state is preservedpublic SubClusterPolicyConfiguration serializeConf() throws FederationPolicyInitializationException
FederationPolicyManagerSubClusterPolicyConfiguration.
This is to be used when writing a policy object in the federation policy
store.serializeConf in interface FederationPolicyManagerFederationPolicyInitializationException - if the current state cannot
be serialized properlypublic java.lang.String getQueue()
FederationPolicyManagergetQueue in interface FederationPolicyManagerpublic void setQueue(java.lang.String queue)
FederationPolicyManagersetQueue in interface FederationPolicyManagerqueue - the name of the queue.public abstract WeightedPolicyInfo getWeightedPolicyInfo()
getWeightedPolicyInfo in interface FederationPolicyManagerpublic abstract void setWeightedPolicyInfo(WeightedPolicyInfo weightedPolicyInfo)
setWeightedPolicyInfo in interface FederationPolicyManagerweightedPolicyInfo - weightedPolicyInfo of the subCluster.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.