Interface IPassiveResourceListener


  • public interface IPassiveResourceListener
    This listener observes a SimPassiveResource. It is being notified whenever a SimulatedProcess requests an arbitrary number of instances of the observed resource, when instances are granted to the requesting process (i.e., the process "acquires" the resource), or when the process releases instances of the resource.

    Thus, the methods of this listener are invoked in a fixed order as follows.

    1. request
    2. acquire
    3. release
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void acquire​(SimulatedProcess process, long num)
      The given process has successfully acquired num instances of the passive resource.
      void release​(SimulatedProcess process, long num)
      The given process has released num instances of the passive resource.
      void request​(SimulatedProcess process, long num)
      The given process has requested num instances of the passive resource but not yet acquired them.
    • Method Detail

      • request

        void request​(SimulatedProcess process,
                     long num)
        The given process has requested num instances of the passive resource but not yet acquired them.
      • acquire

        void acquire​(SimulatedProcess process,
                     long num)
        The given process has successfully acquired num instances of the passive resource.
      • release

        void release​(SimulatedProcess process,
                     long num)
        The given process has released num instances of the passive resource.