Class DefaultResourceDeclarer<T extends DefaultResourceDeclarer>
java.lang.Object
org.apache.storm.trident.operation.DefaultResourceDeclarer<T>
- Type Parameters:
- T- Must always be the type of the extending class. i.e.- public class SubResourceDeclarer extends DefaultResourceDeclarer<SubResourceDeclarer> {...}
- All Implemented Interfaces:
- ResourceDeclarer<T>,- ITridentResource
- Direct Known Subclasses:
- Node
public class DefaultResourceDeclarer<T extends DefaultResourceDeclarer>
extends Object
implements ResourceDeclarer<T>, ITridentResource
Default implementation of resources declarer.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddSharedMemory(SharedMemory request) Add in request for shared memory that this component will use.Get resource.Get shared memory.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.
- 
Constructor Details- 
DefaultResourceDeclarerpublic DefaultResourceDeclarer()
 
- 
- 
Method Details- 
setMemoryLoadDescription copied from interface:ResourceDeclarerSet the amount of on heap memory for this component.- Specified by:
- setMemoryLoadin interface- ResourceDeclarer<T extends DefaultResourceDeclarer>
- Parameters:
- onHeap- the amount of on heap memory
- Returns:
- this for chaining
 
- 
setMemoryLoadDescription copied from interface:ResourceDeclarerSet the amount of memory for this component on and off heap.- Specified by:
- setMemoryLoadin interface- ResourceDeclarer<T extends DefaultResourceDeclarer>
- Parameters:
- onHeap- the amount of on heap memory
- offHeap- the amount of off heap memory
- Returns:
- this for chaining
 
- 
setCPULoadDescription copied from interface:ResourceDeclarerSet the amount of CPU load for this component.- Specified by:
- setCPULoadin interface- ResourceDeclarer<T extends DefaultResourceDeclarer>
- Parameters:
- amount- the amount of CPU
- Returns:
- this for chaining
 
- 
getResourcesDescription copied from interface:ITridentResourceGet resource.- Specified by:
- getResourcesin interface- ITridentResource
- Returns:
- a name of resource name -> amount of that resource. *Return should never be null!*
 
 
-