public abstract class BaseConfigurationDeclarer<T extends ComponentConfigurationDeclarer> extends Object implements ComponentConfigurationDeclarer<T>
Constructor and Description |
---|
BaseConfigurationDeclarer() |
Modifier and Type | Method and Description |
---|---|
T |
addConfiguration(String config,
Object value)
Add in a single config.
|
T |
addResource(String resourceName,
Number resourceValue)
Add generic resource for this component.
|
T |
addResources(Map<String,Double> resources)
Add generic resources for this component.
|
T |
setCPULoad(Number amount)
Set the amount of CPU load for this component.
|
T |
setDebug(boolean debug)
Turn on/off debug for this component.
|
T |
setMaxSpoutPending(Number val)
Set the max spout pending config for this component.
|
T |
setMaxTaskParallelism(Number val)
Set the max task parallelism for this component.
|
T |
setMemoryLoad(Number onHeap)
Set the amount of on heap memory for this component.
|
T |
setMemoryLoad(Number onHeap,
Number offHeap)
Set the amount of memory for this component on and off heap.
|
T |
setNumTasks(Number val)
Set the number of tasks for this component.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addConfigurations, getComponentConfiguration
addSharedMemory
public T addConfiguration(String config, Object value)
ComponentConfigurationDeclarer
Add in a single config.
addConfiguration
in interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
config
- the key for the configvalue
- the value of the configpublic T setDebug(boolean debug)
ComponentConfigurationDeclarer
Turn on/off debug for this component.
setDebug
in interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
debug
- true for debug on false for debug offpublic T setMaxTaskParallelism(Number val)
ComponentConfigurationDeclarer
Set the max task parallelism for this component.
setMaxTaskParallelism
in interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
val
- the maximum parallelismpublic T setMaxSpoutPending(Number val)
ComponentConfigurationDeclarer
Set the max spout pending config for this component.
setMaxSpoutPending
in interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
val
- the value of max spout pending.public T setNumTasks(Number val)
ComponentConfigurationDeclarer
Set the number of tasks for this component.
setNumTasks
in interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
val
- the number of taskspublic T setMemoryLoad(Number onHeap)
ResourceDeclarer
Set the amount of on heap memory for this component.
setMemoryLoad
in interface ResourceDeclarer<T extends ComponentConfigurationDeclarer>
onHeap
- the amount of on heap memorypublic T setMemoryLoad(Number onHeap, Number offHeap)
ResourceDeclarer
Set the amount of memory for this component on and off heap.
setMemoryLoad
in interface ResourceDeclarer<T extends ComponentConfigurationDeclarer>
onHeap
- the amount of on heap memoryoffHeap
- the amount of off heap memorypublic T setCPULoad(Number amount)
ResourceDeclarer
Set the amount of CPU load for this component.
setCPULoad
in interface ResourceDeclarer<T extends ComponentConfigurationDeclarer>
amount
- the amount of CPUpublic T addResource(String resourceName, Number resourceValue)
ComponentConfigurationDeclarer
Add generic resource for this component.
addResource
in interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
public T addResources(Map<String,Double> resources)
Add generic resources for this component.
addResources
in interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
Copyright © 2022 The Apache Software Foundation. All rights reserved.