com.sonyericsson.hudson.plugins.gerrit.trigger.config
Class PluginConfig

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.trigger.config.PluginConfig
All Implemented Interfaces:
com.sonymobile.tools.gerrit.gerritevents.workers.GerritWorkersConfig

public class PluginConfig
extends Object
implements com.sonymobile.tools.gerrit.gerritevents.workers.GerritWorkersConfig

Configuration bean for the global plugin configuration.

Author:
rinrinne <rinrin.ne@gmail.com>

Field Summary
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 Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NR_OF_RECEIVING_WORKER_THREADS

public static final int DEFAULT_NR_OF_RECEIVING_WORKER_THREADS
Default number of receiving worker threads.

See Also:
Constant Field Values

DEFAULT_NR_OF_SENDING_WORKER_THREADS

public static final int DEFAULT_NR_OF_SENDING_WORKER_THREADS
Default number of sending worker threads.

See Also:
Constant Field Values
Constructor Detail

PluginConfig

public PluginConfig()
Constructs a config with default data.


PluginConfig

public PluginConfig(net.sf.json.JSONObject formData)
Constructor.

Parameters:
formData - the data.

PluginConfig

public PluginConfig(PluginConfig pluginConfig)
Copy constructor.

Parameters:
pluginConfig - the PluginConfig object to be copied.

PluginConfig

public PluginConfig(net.sf.json.JSONObject formData,
                    org.kohsuke.stapler.StaplerRequest req)
Unused Constructor?

Parameters:
formData - the data
req - a path.
Method Detail

setValues

public void setValues(net.sf.json.JSONObject formData)
Sets all config values from the provided JSONObject.

Parameters:
formData - the JSON object with form data.

getNumberOfReceivingWorkerThreads

public int getNumberOfReceivingWorkerThreads()
The number of threads to handle incoming events with.

Specified by:
getNumberOfReceivingWorkerThreads in interface com.sonymobile.tools.gerrit.gerritevents.workers.GerritWorkersConfig
Returns:
the number of worker threads.

setNumberOfReceivingWorkerThreads

public void setNumberOfReceivingWorkerThreads(int numberOfReceivingWorkerThreads)
NumberOfReceivingWorkerThreads.

Parameters:
numberOfReceivingWorkerThreads - nr of threads.
See Also:
getNumberOfReceivingWorkerThreads()

getNumberOfSendingWorkerThreads

public int getNumberOfSendingWorkerThreads()
The number of worker threads that sends approvals/review commands.

Specified by:
getNumberOfSendingWorkerThreads in interface com.sonymobile.tools.gerrit.gerritevents.workers.GerritWorkersConfig
Returns:
the number of worker threads.

setNumberOfSendingWorkerThreads

public void setNumberOfSendingWorkerThreads(int numberOfSendingWorkerThreads)
NumberOfSendingWorkerThreads.

Parameters:
numberOfSendingWorkerThreads - nr of threads.
See Also:
getNumberOfSendingWorkerThreads()

getReplicationCacheExpirationInMinutes

public int getReplicationCacheExpirationInMinutes()
Replication cache expiration in minutes.

Returns:
the replicationCacheExpirationInMinutes

setReplicationCacheExpirationInMinutes

public void setReplicationCacheExpirationInMinutes(int replicationCacheExpirationInMinutes)
Replication cache expiration in minutes.

Parameters:
replicationCacheExpirationInMinutes - expiration time to set


Copyright © 2004-2014. All Rights Reserved.