Sage Modeling and Simulation Library

ResourceManager Members

The ResourceManager type exposes the following members.

Constructors


  Name Description
Public method ResourceManager(IModel, String, Guid, Boolean)
Creates a new resource manager.
Public method ResourceManager()()()()
A default constructor, to be used for creating an empty object prior to reconstitution from a serializer.

Methods


  Name Description
Public method Acquire
Attempts to acquire a proscribed quantity of a resource in this resource pool. If the resource has already been reserved under this resourceRequest, it simply acquires that resource. If no resource has been reserved, then the best available resource will be reserved, and then acquired.
Protected method AcquireWithWait
Acquires the resource and quantity specifed by the resource request, blocking until it can return successfully.
Public method Add
Adds a resource to this resource manager.
Public method Clear
Clears out the resources in this manager's pool.
Public method DeserializeFrom
Deserializes this object from the specified XmlSerializatonContext.
Public method Equals(System.Object)
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetEnumerator
Retrieves an enumerator across all of the resources in this pool.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method InitializeIdentity
Initialize the identity of this model object, once.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Release
Releases the resource held under this resource request back into the resource pool.
Public method Remove
Removes a resource from this resource manager.
Public method Reserve
Attempts to reserve a proscribed quantity of a particular resource in this resource pool. This removes the resource quantity from availability for further reservation & acquisition.
Protected method ReserveBestResource
Determines and reserves the 'best' resource in the pool for the specified resource request. The determination is based on the access regulator agreeing that the requestor may request it, and the scoring algorithm in the resourceRequest providing the best score for the resource.
Protected method ReserveWithWait
Reserves the resource and quantity specifed by the resource request, blocking until it can return successfully.
Public method SerializeTo
Serializes this object to the specified XmlSerializatonContext.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method Unreserve
Unreserves a quantity of resource from this pool that was previously reserved under the provided resource request.

Properties


  Name Description
Public property AccessRegulator
The access regulator that governs which requestors may acquire which resources.
Public property Description
A description of this Resource Manager.
Public property Guid
The Guid for this object. Typically required to be unique.
Public property Item
Indexer that retrieves a resource from this pool by its Guid.
Public property Model
The model that owns this object, or from which this object gets time, etc. data.
Public property Name
The user-friendly name for this object.
Public property Resources
Returns a read-only list of the resources in this pool.
Public property SupportsPrioritizedRequests
Gets a value indicating whether this resource manager supports prioritized requests.

Events


  Name Description
Public event ResourceAcquired
This event is fired when a resource is acquired from this pool.
Public event ResourceAdded
This event is fired when a resource is added to the available resources in this pool.
Public event ResourceReleased
This event is fired when a resource is released back into this pool.
Public event ResourceRemoved
This event is fired when a resource is removed from the available resources in this pool.
Public event ResourceRequested
This event is fired when a resource is requested from this pool.