de.uka.ipd.sdq.scheduler
Interface IPassiveResource

All Known Implementing Classes:
SimAbstractPassiveResource, SimFairPassiveResource, SimUnfairPassiveResource

public interface IPassiveResource

A passive can be hold by a process for some time. As the number of available instances is limited the process might has to wait until it gets the requested number of instances.

Author:
jens

Method Summary
 boolean acquire(ISchedulableProcess process, int num)
          Acquires num instances of the passive resource for the given process.
 String getId()
          Unique identifier of the resource.
 String getName()
          Name of the resource.
 void release(ISchedulableProcess process, int num)
          Releases num instances of the passive resource from the given process.
 

Method Detail

acquire

boolean acquire(ISchedulableProcess process,
                int num)
Acquires num instances of the passive resource for the given process. The process is blocked until it successfully receives the requested number of resource instances.

Returns:
True, if the acquisition was successful, otherwise false.

release

void release(ISchedulableProcess process,
             int num)
Releases num instances of the passive resource from the given process.


getName

String getName()
Name of the resource.

Returns:

getId

String getId()
Unique identifier of the resource.

Returns: