Package org.apache.storm.topology
Interface ResourceDeclarer<T extends ResourceDeclarer>
- All Known Subinterfaces:
BoltDeclarer
,ComponentConfigurationDeclarer<T>
,LinearDRPCInputDeclarer
,SpoutDeclarer
- All Known Implementing Classes:
BaseConfigurationDeclarer
,DefaultResourceDeclarer
,Node
,PartitionNode
,ProcessorNode
,SpoutNode
,Stream
,TopologyBuilder.BoltGetter
,TopologyBuilder.ConfigGetter
,TopologyBuilder.SpoutGetter
,TridentState
public interface ResourceDeclarer<T extends ResourceDeclarer>
This is a new base interface that can be used by anything that wants to mirror RAS's basic API. Trident uses this to allow setting
resources in the Stream API.
-
Method Summary
Modifier and TypeMethodDescriptionaddSharedMemory
(SharedMemory request) Add in request for shared memory that this component will use.setCPULoad
(Number amount) Set the amount of CPU load for this component.setMemoryLoad
(Number onHeap) Set the amount of on heap memory for this component.setMemoryLoad
(Number onHeap, Number offHeap) Set the amount of memory for this component on and off heap.
-
Method Details
-
setMemoryLoad
Set the amount of on heap memory for this component.- Parameters:
onHeap
- the amount of on heap memory- Returns:
- this for chaining
-
setMemoryLoad
Set the amount of memory for this component on and off heap.- Parameters:
onHeap
- the amount of on heap memoryoffHeap
- the amount of off heap memory- Returns:
- this for chaining
-
setCPULoad
Set the amount of CPU load for this component.- Parameters:
amount
- the amount of CPU- Returns:
- this for chaining
-