@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class SubClusterPolicyConfiguration extends Object
SubClusterPolicyConfiguration
is a class that represents a
configuration of a policy. For a single queue, it contains a policy type
(resolve to a class name) and its params as an opaque ByteBuffer
.
Note: by design the params are an opaque ByteBuffer, this allows for enough
flexibility to evolve the policies without impacting the protocols to/from
the federation state store.Constructor and Description |
---|
SubClusterPolicyConfiguration() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
abstract ByteBuffer |
getParams()
Get the policy parameters.
|
abstract String |
getQueue()
Get the name of the queue for which we are configuring a policy.
|
abstract String |
getType()
Get the type of the policy.
|
int |
hashCode() |
static SubClusterPolicyConfiguration |
newInstance(String queue,
String policyType,
ByteBuffer policyParams) |
static SubClusterPolicyConfiguration |
newInstance(SubClusterPolicyConfiguration conf) |
abstract void |
setParams(ByteBuffer policyParams)
Set the policy parameters.
|
abstract void |
setQueue(String queueName)
Sets the name of the queue for which we are configuring a policy.
|
abstract void |
setType(String policyType)
Sets the type of the policy.
|
String |
toString() |
@InterfaceAudience.Private @InterfaceStability.Unstable public static SubClusterPolicyConfiguration newInstance(String queue, String policyType, ByteBuffer policyParams)
@InterfaceAudience.Private @InterfaceStability.Unstable public static SubClusterPolicyConfiguration newInstance(SubClusterPolicyConfiguration conf)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getQueue()
@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setQueue(String queueName)
queueName
- the name of the queue@InterfaceAudience.Public @InterfaceStability.Unstable public abstract String getType()
@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setType(String policyType)
policyType
- the type of the policy@InterfaceAudience.Public @InterfaceStability.Unstable public abstract ByteBuffer getParams()
@InterfaceAudience.Private @InterfaceStability.Unstable public abstract void setParams(ByteBuffer policyParams)
policyParams
- byte array that describes the policyCopyright © 2008–2022 Apache Software Foundation. All rights reserved.