Interface IHostResourceManagerOperations

All Known Implementing Classes:
HostResourceManager

public interface IHostResourceManagerOperations
Internal API of the host resource management facililty. Hidden to prevent direct accesses/manipulation of the resource data.
  • Method Details

    • getPermittedThreads

      int getPermittedThreads(IResourcePlan plan, String activityName)
      Gets the number of simultaneous threads that are available for the current activity
      Parameters:
      plan - The resource plan, cannot be null
      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

      boolean isActivityRunning(IResourcePlan plan, String activityName)
      Checks if the given acitvity is being run at the moment.
      Parameters:
      plan - The resource plan, cannot be null
      activityName - The name of the activity. Cannot be null.
      Returns:
      True in case if the activity is being run. False otherwise.
    • startActivity

      void startActivity(IResourcePlan plan, String activityName)
      Starts an activity registered via the corresponding plan. The activity shouldn't be started at the momemnt of the call.
      Parameters:
      plan - The resource plan, cannot be null
      activityName - The name of the activity. Cannot be null.
    • stopActivity

      void stopActivity(IResourcePlan plan, String activityName)
      Stops an activity registered via the corresponding plan. The activity should be started at the moment of the call.
      Parameters:
      plan - The resource plan, cannot be null
      activityName - The name of the activity. Cannot be null.
    • updateDemands

      void updateDemands(IResourcePlan plan, String activityName)
      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
      Parameters:
      plan - The resource plan, cannot be null
      activityName - The name of the activity. Cannot be null.
    • addListener

      void addListener(IResourcePlan plan, IHostResourceManagerListener listener)
      Adds a listener to the handle's plan activities. See IHostResourceManagementHandle.addListener(IHostResourceManagerListener) for details
      Parameters:
      plan - The resource plan, cannot be null
      listener - The listener instance. Cannot be null