public interface JobConsumer
JobConsumer is a kind of client beanstalk, that is responsible for
the consumer job.| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
buryJob(long id,
int priority)
The bury command puts a job into the "buried" state.
|
void |
close()
close the current connection and release resources. that's status is
closed, and is no longer available.
|
boolean |
deleteJob(long id)
The delete command removes a job from the server entirely.
|
boolean |
releaseJob(long id,
int priority,
int delay)
The release command puts a reserved job back into the ready queue (and
marks its state as "ready") to be run by any client.
|
Job |
reserveJob(long timeout)
beanstalkd will wait to send a response until one becomes available.
|
boolean |
touchJob(long id)
The "touch" command allows a worker to request more time to work on a
job.
|
Job reserveJob(long timeout)
timeout - if timeout >= 0, then with reserve-with-timeout command.boolean deleteJob(long id)
id - is the job id to delete.boolean releaseJob(long id,
int priority,
int delay)
id - is the job id to release.priority - is a new priority to assign to the job.delay - is an integer number of seconds to wait before putting the job in
the ready queue. The job will be in the "delayed" state during
this time.boolean buryJob(long id,
int priority)
id - is the job id to bury.priority - is a new priority to assign to the job.boolean touchJob(long id)
id - is the ID of a job reserved by the current connection.void close()
Copyright © 2012~2016–2019 dinstone. All rights reserved.