Package com._1c.g5.resourcemanagement
Interface IActivityDemandsDefinition
-
- All Known Implementing Classes:
ActivityDemandsDefaultAdapter
public interface IActivityDemandsDefinition
Interface that defines the function of resource demands depending on provided external constraints.
In order to support primitive balancing, the function it two-phased:- During the first phase the function computes demands independently of external constraints. During this phase
it's necessary to supply exclusive memory demands, priority, etc. This phase is presented with the
gatherDemands(long, int)
method - During the next phase the function computes demands based on externally defined constraints, like reduced memory
due to other running activities, etc. This phase is presented with the
IActivityDemandsDefinition#gatherPermissions(long, int)
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActivityResourceDemands
gatherDemands(long totalMemory, int totalCores)
Computes resource demands of the activity.ActivityResourcePermissions
gatherPermissions(long availableSharedMemory, int availableCores, SystemLoadState overloadState)
Computes resource permissions for the activity.
-
-
-
Method Detail
-
gatherDemands
ActivityResourceDemands gatherDemands(long totalMemory, int totalCores)
Computes resource demands of the activity.- Parameters:
totalMemory
- The memory available at the moment. During this phase it's a maximum memory amount available for the EDT.totalCores
- CPU cores available for the computation. Cannot be less then 1.- Returns:
- The activity demands information. Cannot be
null
-
gatherPermissions
ActivityResourcePermissions gatherPermissions(long availableSharedMemory, int availableCores, SystemLoadState overloadState)
Computes resource permissions for the activity.- Parameters:
availableMemory
- The shared memory available at the moment. During this phase it's an ammount of unallocated shared memory available at the moment. Cannot be a negative numberavailableCores
- CPU cores available for the computation. Cannot be less then 1overloadState
- Last system overload state. Cannot benull
- Returns:
- The activity demands information. Cannot be
null
-
-