public final class GerritSendCommandQueue extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SEND_QUEUE_SIZE_WARNING_THRESHOLD
The minimum size of the job-queue before monitors should begin to warn the administrator(s).
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final int SEND_QUEUE_SIZE_WARNING_THRESHOLD
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.Copyright © 2004-2015 Hudson. All Rights Reserved.