Class EventSimPassiveResourceModel

    • Constructor Detail

      • EventSimPassiveResourceModel

        @Inject
        public EventSimPassiveResourceModel​(ISimulationMiddleware middleware)
    • Method Detail

      • init

        public void init()
      • acquire

        public void acquire​(IRequest request,
                            org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx,
                            org.palladiosimulator.pcm.repository.PassiveResource specification,
                            int num,
                            Procedure onGrantedCallback)
        Description copied from interface: IPassiveResource
        Acquires the specified number of instance of a passive resource.
        Specified by:
        acquire in interface IPassiveResource
        Parameters:
        request - the request acquiring the passive resource
        assCtx - the passive resource's assembly context is required to uniquely identify the passive resource
        specification - the passive resource to be acquired
        num - the number of instances
        onGrantedCallback - the callback to be invoked once the demanded number of instances have been granted to the request
      • finalise

        public void finalise()
      • release

        public void release​(IRequest request,
                            org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx,
                            org.palladiosimulator.pcm.repository.PassiveResource specification,
                            int i)
        Description copied from interface: IPassiveResource
        Releases a specific amount of a passive resource.
        Specified by:
        release in interface IPassiveResource
        Parameters:
        request - the request releasing the passive resource
        assCtx - the passive resource's assembly context is required to uniquely identify the passive resource
        specification - the passive resource to be released
        i - the number of instances
      • getPassiveResource

        public SimPassiveResource getPassiveResource​(org.palladiosimulator.pcm.repository.PassiveResource specification,
                                                     org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx)
        Parameters:
        specification - the passive resource specification
        Returns:
        the resource instance for the given resource specification