public class DefaultResourceDeclarer<T extends DefaultResourceDeclarer> extends Object implements ResourceDeclarer<T>, ITridentResource
Constructor and Description |
---|
DefaultResourceDeclarer() |
Modifier and Type | Method and Description |
---|---|
T |
addSharedMemory(SharedMemory request)
Add in request for shared memory that this component will use.
|
Map<String,Number> |
getResources() |
Set<SharedMemory> |
getSharedMemory() |
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
|
public T setMemoryLoad(Number onHeap)
ResourceDeclarer
Set the amount of on heap memory for this component
setMemoryLoad
in interface ResourceDeclarer<T extends DefaultResourceDeclarer>
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 DefaultResourceDeclarer>
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 DefaultResourceDeclarer>
amount
- the amount of CPUpublic Map<String,Number> getResources()
getResources
in interface ITridentResource
public Set<SharedMemory> getSharedMemory()
getSharedMemory
in interface ITridentResource
public T addSharedMemory(SharedMemory request)
ResourceDeclarer
Add in request for shared memory that this component will use. See SharedOnHeap
, SharedOffHeapWithinNode
, and SharedOffHeapWithinWorker
for convenient ways to create shared memory requests.
addSharedMemory
in interface ResourceDeclarer<T extends DefaultResourceDeclarer>
request
- the shared memory request for this componentCopyright © 2019 The Apache Software Foundation. All rights reserved.