11#ifndef RESOURCE_RESTRICTION_POLICY_H
12#define RESOURCE_RESTRICTION_POLICY_H
16#include "jobpointer.h"
17#include "queuepolicy.h"
50 void free(JobPointer)
override;
QueuePolicy is an interface for customizations of the queueing behaviour of jobs.
Definition queuepolicy.h:39
ResourceRestrictionPolicy is used to limit the number of concurrent accesses to the same resource.
Definition resourcerestrictionpolicy.h:36
void destructed(JobInterface *job) override
destructing() is called when a Job that has this queue policy assigned gets destructed.
void setCap(int newCap)
Cap the number of simultaneously executing jobs.
void free(JobPointer) override
free() is called after the job has been executed.
void release(JobPointer) override
release() is called if canRun() returned true, but the job has not been executed for external reasons...
bool canRun(JobPointer) override
canRun() is called before the job is executed.