Package org.apache.storm.trident
Class TridentState
- java.lang.Object
-
- org.apache.storm.trident.TridentState
-
- All Implemented Interfaces:
ResourceDeclarer<TridentState>
public class TridentState extends Object implements ResourceDeclarer<TridentState>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTridentState(TridentTopology topology, Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TridentStateaddSharedMemory(SharedMemory request)Add in request for shared memory that this component will use.StreamnewValuesStream()TridentStateparallelismHint(int parallelism)TridentStatesetCPULoad(Number load)Set the amount of CPU load for this component.TridentStatesetMemoryLoad(Number onHeap)Set the amount of on heap memory for this component.TridentStatesetMemoryLoad(Number onHeap, Number offHeap)Set the amount of memory for this component on and off heap.
-
-
-
Constructor Detail
-
TridentState
protected TridentState(TridentTopology topology, Node node)
-
-
Method Detail
-
newValuesStream
public Stream newValuesStream()
-
parallelismHint
public TridentState parallelismHint(int parallelism)
-
setCPULoad
public TridentState setCPULoad(Number load)
Description copied from interface:ResourceDeclarerSet the amount of CPU load for this component.- Specified by:
setCPULoadin interfaceResourceDeclarer<TridentState>- Parameters:
load- the amount of CPU- Returns:
- this for chaining
-
setMemoryLoad
public TridentState setMemoryLoad(Number onHeap)
Description copied from interface:ResourceDeclarerSet the amount of on heap memory for this component.- Specified by:
setMemoryLoadin interfaceResourceDeclarer<TridentState>- Parameters:
onHeap- the amount of on heap memory- Returns:
- this for chaining
-
setMemoryLoad
public TridentState setMemoryLoad(Number onHeap, Number offHeap)
Description copied from interface:ResourceDeclarerSet the amount of memory for this component on and off heap.- Specified by:
setMemoryLoadin interfaceResourceDeclarer<TridentState>- Parameters:
onHeap- the amount of on heap memoryoffHeap- the amount of off heap memory- Returns:
- this for chaining
-
addSharedMemory
public TridentState addSharedMemory(SharedMemory request)
Description copied from interface:ResourceDeclarerAdd in request for shared memory that this component will use. SeeSharedOnHeap,SharedOffHeapWithinNode, andSharedOffHeapWithinWorkerfor convenient ways to create shared memory requests.- Specified by:
addSharedMemoryin interfaceResourceDeclarer<TridentState>- Parameters:
request- the shared memory request for this component- Returns:
- this for chaining
-
-