Interface IStateListener


  • public interface IStateListener
    A state listener observes a SimActiveResource for state changes. The resource state is the length of the resource's queue. Whenever the state changes, the resource notifies its observers by calling the stateChanges method on the listeners.
    See Also:
    SimActiveResource#addStateListener(IStateListener, int)
    • Method Detail

      • stateChanged

        void stateChanged​(long state,
                          int instanceId)
        Called whenever the resource state changes.
        Parameters:
        state - the length of the resource's queue
        instanceId - an identifier for the resource instance, for instance a CPU core. If the resource has only one instance, the instanceId must be 0 for that instance.