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 Summary
Modifier and TypeMethodDescriptionvoid
addListener
(IResourcePlan plan, IHostResourceManagerListener listener) Adds a listener to the handle's plan activities.int
getPermittedThreads
(IResourcePlan plan, String activityName) Gets the number of simultaneous threads that are available for the current activityboolean
isActivityRunning
(IResourcePlan plan, String activityName) Checks if the given acitvity is being run at the moment.void
startActivity
(IResourcePlan plan, String activityName) Starts an activity registered via the corresponding plan.void
stopActivity
(IResourcePlan plan, String activityName) Stops an activity registered via the corresponding plan.void
updateDemands
(IResourcePlan plan, String activityName) Updates demands of the selected activity (should be started at the moment of the update).
-
Method Details
-
getPermittedThreads
Gets the number of simultaneous threads that are available for the current activity- Parameters:
plan
- The resource plan, cannot benull
activityName
- The name of the activity. Cannot benull
- Returns:
- The number of threads permitted for the selected activity praocessing. Cannot be less then {@code 1)
-
isActivityRunning
Checks if the given acitvity is being run at the moment.- Parameters:
plan
- The resource plan, cannot benull
activityName
- The name of the activity. Cannot benull
.- Returns:
- True in case if the activity is being run. False otherwise.
-
startActivity
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 benull
activityName
- The name of the activity. Cannot benull
.
-
stopActivity
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 benull
activityName
- The name of the activity. Cannot benull
.
-
updateDemands
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 benull
activityName
- The name of the activity. Cannot benull
.
-
addListener
Adds a listener to the handle's plan activities. SeeIHostResourceManagementHandle.addListener(IHostResourceManagerListener)
for details- Parameters:
plan
- The resource plan, cannot benull
listener
- The listener instance. Cannot benull
-