Package com._1c.g5.resourcemanagement
Class ActivityDemandsDefaultAdapter
java.lang.Object
com._1c.g5.resourcemanagement.ActivityDemandsDefaultAdapter
- All Implemented Interfaces:
IActivityDemandsDefinition
Default implementation of the
IActivityDemandsDefinition
. Used for cases then service doesn't
need to declare both demands permissions computation logic.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongatherDemands
(long totalMemory, int totalCores) Computes resource demands of the activity.gatherPermissions
(long availableSharedMemory, int availableCores, SystemLoadState overloadState) Computes resource permissions for the activity.
-
Constructor Details
-
ActivityDemandsDefaultAdapter
public ActivityDemandsDefaultAdapter()
-
-
Method Details
-
gatherDemands
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
-