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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
addSharedMemory(SharedMemory request)
Add in request for shared memory that this component will use.T
setCPULoad(Number amount)
Set the amount of CPU load 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.
-
-
-
Method Detail
-
setMemoryLoad
T setMemoryLoad(Number onHeap)
Set the amount of on heap memory for this component.- Parameters:
onHeap
- the amount of on heap memory- Returns:
- this for chaining
-
setMemoryLoad
T setMemoryLoad(Number onHeap, Number offHeap)
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
T setCPULoad(Number amount)
Set the amount of CPU load for this component.- Parameters:
amount
- the amount of CPU- Returns:
- this for chaining
-
addSharedMemory
T addSharedMemory(SharedMemory request)
Add in request for shared memory that this component will use. SeeSharedOnHeap
,SharedOffHeapWithinNode
, andSharedOffHeapWithinWorker
for convenient ways to create shared memory requests.- Parameters:
request
- the shared memory request for this component- Returns:
- this for chaining
-
-