Class HostResourceManagementHandle

java.lang.Object
com._1c.g5.v8.internal.resourcemanagement.HostResourceManagementHandle
All Implemented Interfaces:
IHostResourceManagementHandle

public class HostResourceManagementHandle extends Object implements IHostResourceManagementHandle
IHostResourceManagementHandle implementation that delegates all calls to the internal API IHostResourceManagerOperations.
  • Constructor Details

  • Method Details

    • getPermittedThreads

      public int getPermittedThreads(String activityName)
      Description copied from interface: IHostResourceManagementHandle
      Gets the number of simultaneous threads that are available for the current activity
      Specified by:
      getPermittedThreads in interface IHostResourceManagementHandle
      Parameters:
      activityName - The name of the activity. Cannot be null
      Returns:
      The number of threads permitted for the selected activity praocessing. Cannot be less then {@code 1)
    • isActivityRunning

      public boolean isActivityRunning(String activityName)
      Description copied from interface: IHostResourceManagementHandle
      Checks if the given acitvity is being run at the moment.
      Specified by:
      isActivityRunning in interface IHostResourceManagementHandle
      Parameters:
      activityName - The name of the activity. Cannot be null.
      Returns:
      True in case if the activity is being run. False otherwise.
    • startActivity

      public void startActivity(String activityName)
      Description copied from interface: IHostResourceManagementHandle
      Starts an activity registered via the corresponding plan. The activity shouldn't be started at the momemnt of the call.
      Specified by:
      startActivity in interface IHostResourceManagementHandle
      Parameters:
      activityName - The name of the activity. Cannot be null.
    • stopActivity

      public void stopActivity(String activityName)
      Description copied from interface: IHostResourceManagementHandle
      Stops an activity registered via the corresponding plan. The activity should be started at the moment of the call.
      Specified by:
      stopActivity in interface IHostResourceManagementHandle
      Parameters:
      activityName - The name of the activity. Cannot be null.
    • updateDemands

      public void updateDemands(String activityName)
      Description copied from interface: IHostResourceManagementHandle
      Updates demands of the selected activity (should be started at the moment of the update). The resource management facility should re-balance the resource permissions and notify all affected clients as a result
      Specified by:
      updateDemands in interface IHostResourceManagementHandle
      Parameters:
      activityName - The name of the activity
    • addListener

      public void addListener(IHostResourceManagerListener listener)
      Description copied from interface: IHostResourceManagementHandle
      Adds a listener to the handle's plan activities.
      The usual strategy is to register a single listener for all activities of the plan.
      There is no need in managing the listener lifecycle - it will be disposed at the end of the resource subsystem lifecycle.
      Specified by:
      addListener in interface IHostResourceManagementHandle
      Parameters:
      listener - The listener instance, cannot be null