Class Scheduler
- java.lang.Object
-
- ai.preferred.venom.job.Scheduler
-
public class Scheduler extends Object
This interface represents only the adding part a scheduler.- Author:
- Maksim Tkachenko, Ween Jiann Lee
-
-
Constructor Summary
Constructors Constructor Description Scheduler(BlockingQueue<Job> queue)
Constructs an instance of Scheduler.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(@NotNull Request request)
Adds a request to the queue.void
add(@NotNull Request request, @NotNull JobAttribute... jobAttributes)
Adds a request to the queue.void
add(@NotNull Request request, Handler handler, @NotNull JobAttribute... jobAttributes)
Adds a request to the queue.void
add(@NotNull Request r, Handler h, Priority p)
Deprecated.void
add(@NotNull Request r, Handler h, Priority p, Priority pf)
Deprecated.void
add(@NotNull Request r, Priority p)
Deprecated.void
add(@NotNull Request r, Priority p, Priority pf)
Deprecated.void
add(Request request, @NotNull Handler handler)
Adds a request to the queue.
-
-
-
Constructor Detail
-
Scheduler
public Scheduler(BlockingQueue<Job> queue)
Constructs an instance of Scheduler.- Parameters:
queue
- an instance of BlockingQueue
-
-
Method Detail
-
add
public final void add(@NotNull @NotNull Request request, Handler handler, @NotNull @NotNull JobAttribute... jobAttributes)
Adds a request to the queue.This request would be parsed by the handler specified.
- Parameters:
request
- request to fetch when dequeued.handler
- handler to be used to parse the request.jobAttributes
- attributes to insert to the job.
-
add
public final void add(@NotNull @NotNull Request request, @NotNull @NotNull JobAttribute... jobAttributes)
Adds a request to the queue.This request would be parsed by the handler specified.
- Parameters:
request
- request to fetch when dequeued.jobAttributes
- attributes to insert to the job.
-
add
public final void add(Request request, @NotNull @NotNull Handler handler)
Adds a request to the queue.This request would be parsed by the handler specified.
- Parameters:
request
- request to fetch when dequeued.handler
- handler to be used to parse the request.
-
add
public final void add(@NotNull @NotNull Request request)
Adds a request to the queue.This request would be parsed by a handler defined in Router or otherwise defined.
- Parameters:
request
- request to fetch when dequeued.
-
add
@Deprecated public final void add(@NotNull @NotNull Request r, Handler h, Priority p, Priority pf)
Deprecated.Adds a request to the queue. Will be removed in the next release.This request would be parsed by the handler specified, and its priority can be downgraded to a minimum priority specified.
- Parameters:
r
- request to fetch when dequeuedh
- handler to be used to parse the requestp
- initial priority of the requestpf
- the minimum (floor) priority of this request
-
add
@Deprecated public final void add(@NotNull @NotNull Request r, Handler h, Priority p)
Deprecated.Adds a request to the queue. Will be removed in the next release.This request would be parsed by the handler specified, and its priority can be downgraded to the default minimum priority.
- Parameters:
r
- request to fetch when dequeuedh
- handler to be used to parse the requestp
- initial priority of the request
-
add
@Deprecated public final void add(@NotNull @NotNull Request r, Priority p, Priority pf)
Deprecated.Adds a request to the queue. Will be removed in the next release.This request would be parsed by a handler defined in Router or otherwise, and its priority can be downgraded to a minimum priority specified.
- Parameters:
r
- request to fetch when dequeuedp
- initial priority of the requestpf
- the minimum (floor) priority of this request
-
add
@Deprecated public final void add(@NotNull @NotNull Request r, Priority p)
Deprecated.Adds a request to the queue. Will be removed in the next release.This request would be parsed by a handler defined in Router or otherwise defined, and its priority can be downgraded to the default minimum priority.
- Parameters:
r
- request to fetch when dequeuedp
- initial priority of the request
-
-