Package com._1c.g5.resourcemanagement
Class ActivityDemandsDefaultAdapter
- java.lang.Object
-
- com._1c.g5.resourcemanagement.ActivityDemandsDefaultAdapter
-
- All Implemented Interfaces:
IActivityDemandsDefinition
public class ActivityDemandsDefaultAdapter extends Object implements IActivityDemandsDefinition
Default implementation of theIActivityDemandsDefinition
. Used for cases then service doesn't need to declare both demands permissions computation logic.
-
-
Constructor Summary
Constructors Constructor Description ActivityDemandsDefaultAdapter()
-
Method Summary
All Methods Instance Methods Concrete 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
public ActivityResourceDemands gatherDemands(long totalMemory, int totalCores)
Description copied from interface:IActivityDemandsDefinition
Computes resource demands of the activity.- Specified by:
gatherDemands
in interfaceIActivityDemandsDefinition
- 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
public ActivityResourcePermissions gatherPermissions(long availableSharedMemory, int availableCores, SystemLoadState overloadState)
Description copied from interface:IActivityDemandsDefinition
Computes resource permissions for the activity.- Specified by:
gatherPermissions
in interfaceIActivityDemandsDefinition
availableCores
- 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
-
-