Class ActivityDemandsDefaultAdapter

java.lang.Object
com._1c.g5.resourcemanagement.ActivityDemandsDefaultAdapter
All Implemented Interfaces:
IActivityDemandsDefinition

public class ActivityDemandsDefaultAdapter extends Object implements IActivityDemandsDefinition
Default implementation of the IActivityDemandsDefinition. Used for cases then service doesn't need to declare both demands permissions computation logic.
  • Constructor Details

    • ActivityDemandsDefaultAdapter

      public ActivityDemandsDefaultAdapter()
  • Method Details

    • gatherDemands

      public ActivityResourceDemands gatherDemands(long totalMemory, int totalCores)
      Description copied from interface: IActivityDemandsDefinition
      Computes resource demands of the activity.
      Specified by:
      gatherDemands in interface IActivityDemandsDefinition
      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 interface IActivityDemandsDefinition
      availableCores - CPU cores available for the computation. Cannot be less then 1
      overloadState - Last system overload state. Cannot be null
      Returns:
      The activity demands information. Cannot be null