|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritSendCommandQueue
public final class GerritSendCommandQueue
A thread-pool and queue implementation for queueing commands to the Gerrit server.
| Field Summary | |
|---|---|
static int |
SEND_QUEUE_SIZE_WARNING_THRESHOLD
The minimum size of the job-queue before monitors should begin to warn the administrator(s). |
| Method Summary | |
|---|---|
static GerritSendCommandQueue |
getInstance(GerritConnectionConfig config)
Returns the singleton instance of the command-queue. |
static int |
getQueueSize()
Returns the current queue size. |
static void |
queue(AbstractSendCommandJob job)
Adds a command-job to the singleton instance's queue. |
void |
queueJob(AbstractSendCommandJob job)
Adds a job to the queue. |
static void |
shutdown()
Shuts down the executor(s). |
protected void |
startQueue(GerritConnectionConfig config)
Starts the executor if it hasn't started yet, or updates the thread-pool size if it is started. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SEND_QUEUE_SIZE_WARNING_THRESHOLD
| Method Detail |
|---|
public static GerritSendCommandQueue getInstance(GerritConnectionConfig config)
config - the config.
public static void queue(AbstractSendCommandJob job)
job - the job to do.public static int getQueueSize()
ThreadPoolExecutor.getQueue()public void queueJob(AbstractSendCommandJob job)
job - the job to do.AbstractExecutorService.submit(Runnable)protected void startQueue(GerritConnectionConfig config)
config - the config with the pool-size.public static void shutdown()
WAIT_FOR_JOBS_SHUTDOWN_TIMEOUT seconds for all jobs to finish
before forcefully shutting them down.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||