public class PluginConfig extends Object implements com.sonymobile.tools.gerrit.gerritevents.workers.GerritWorkersConfig
Modifier and Type | Field and Description |
---|---|
static List<String> |
ALL_EVENTS
Full event list.
|
static List<String> |
DEFAULT_EVENT_FILTER
Default event filter.
|
static int |
DEFAULT_NR_OF_RECEIVING_WORKER_THREADS
Default number of receiving worker threads.
|
static int |
DEFAULT_NR_OF_SENDING_WORKER_THREADS
Default number of sending worker threads.
|
Constructor and Description |
---|
PluginConfig()
Constructs a config with default data.
|
PluginConfig(net.sf.json.JSONObject formData)
Constructor.
|
PluginConfig(net.sf.json.JSONObject formData,
org.kohsuke.stapler.StaplerRequest req)
Unused Constructor?
|
PluginConfig(PluginConfig pluginConfig)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
static List<String> |
getAllEvents()
Get the full list of supported events.
|
static List<String> |
getDefaultEventFilter()
Get the default event filter.
|
int |
getEventTypesSize()
Get the number of events that are supported.
|
List<String> |
getFilterIn()
Get the list of events that are filtered in.
|
int |
getNumberOfReceivingWorkerThreads()
The number of threads to handle incoming events with.
|
int |
getNumberOfSendingWorkerThreads()
The number of worker threads that sends approvals/review commands.
|
int |
getReplicationCacheExpirationInMinutes()
Replication cache expiration in minutes.
|
void |
setNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads)
NumberOfReceivingWorkerThreads.
|
void |
setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
NumberOfSendingWorkerThreads.
|
void |
setReplicationCacheExpirationInMinutes(int replicationCacheExpirationInMinutes)
Replication cache expiration in minutes.
|
void |
setValues(net.sf.json.JSONObject formData)
Sets all config values from the provided JSONObject.
|
void |
updateEventFilter()
Update the server event filter.
|
public static final int DEFAULT_NR_OF_RECEIVING_WORKER_THREADS
public static final int DEFAULT_NR_OF_SENDING_WORKER_THREADS
public PluginConfig()
public PluginConfig(net.sf.json.JSONObject formData)
formData
- the data.public PluginConfig(PluginConfig pluginConfig)
pluginConfig
- the PluginConfig object to be copied.public PluginConfig(net.sf.json.JSONObject formData, org.kohsuke.stapler.StaplerRequest req)
formData
- the datareq
- a path.public void setValues(net.sf.json.JSONObject formData)
formData
- the JSON object with form data.public int getNumberOfReceivingWorkerThreads()
getNumberOfReceivingWorkerThreads
in interface com.sonymobile.tools.gerrit.gerritevents.workers.GerritWorkersConfig
public void setNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads)
numberOfReceivingWorkerThreads
- nr of threads.getNumberOfReceivingWorkerThreads()
public int getNumberOfSendingWorkerThreads()
getNumberOfSendingWorkerThreads
in interface com.sonymobile.tools.gerrit.gerritevents.workers.GerritWorkersConfig
public void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
numberOfSendingWorkerThreads
- nr of threads.getNumberOfSendingWorkerThreads()
public int getReplicationCacheExpirationInMinutes()
public void setReplicationCacheExpirationInMinutes(int replicationCacheExpirationInMinutes)
replicationCacheExpirationInMinutes
- expiration time to setpublic int getEventTypesSize()
public List<String> getFilterIn()
public void updateEventFilter()
public static List<String> getDefaultEventFilter()
Copyright © 2016–2020. All rights reserved.