public class NodePool extends Object implements hudson.model.Describable<NodePool>
Instances hold configuration data entered in the Jenkins UI and are serialised/deserialised via Stapler. This class does not implement serialisable, it would be useful if it did, as then readObject could be used to initTransients. However making it serialisable causes problems with the Charset field which doesn't implement serialisable but does serialise just fine * via xstreame :/
Modifier and Type | Class and Description |
---|---|
static class |
NodePool.NodePoolDescriptor
Descriptor class to support configuration of a NodePool instance in the
Jenkins UI
|
Constructor and Description |
---|
NodePool(String connectionString,
String credentialsId,
String labelPrefix,
String requestRoot,
String priority,
String requestor,
String zooKeeperRoot,
String nodeRoot)
Constructor invoked by Jenkins's Stapler library.
|
Modifier and Type | Method and Description |
---|---|
List<NodePoolNode> |
acceptNodes(NodeRequest request)
Accept the node that was created to satisfy the given request.
|
static org.apache.curator.framework.CuratorFramework |
createZKConnection(String connectionString,
String zkRoot)
Create a curator managed connection to ZooKeeper
|
Charset |
getCharset() |
org.apache.curator.framework.CuratorFramework |
getConn() |
String |
getConnectionString() |
String |
getCredentialsId() |
hudson.model.Descriptor<NodePool> |
getDescriptor() |
com.google.gson.Gson |
getGson() |
String |
getLabelPrefix() |
String |
getNodeRoot() |
String |
getPriority() |
String |
getRequestor() |
String |
getRequestRoot() |
List<NodeRequest> |
getRequests() |
String |
getZooKeeperRoot() |
String |
nodePoolLabelFromJenkinsLabel(String jenkinsLabel)
Convert the given jenkins label into its NodePool equivalent
|
void |
setConnectionString(String connectionString) |
void |
setCredentialsId(String credentialsId) |
void |
setLabelPrefix(String labelPrefix) |
void |
setNodeRoot(String nodeRoot) |
void |
setPriority(String priority) |
void |
setRequestor(String requestor) |
void |
setRequestRoot(String requestRoot) |
void |
setRequests(List<NodeRequest> requests) |
void |
setZooKeeperRoot(String zooKeeperRoot) |
@DataBoundConstructor public NodePool(String connectionString, String credentialsId, String labelPrefix, String requestRoot, String priority, String requestor, String zooKeeperRoot, String nodeRoot)
connectionString
- ZooKeeper connection stringcredentialsId
- Credential information identifierlabelPrefix
- Prefix for labels served by this NodePool clusterrequestRoot
- Prefix of node requestspriority
- Priority value of node requestsrequestor
- Name of process making node requestszooKeeperRoot
- Prefix of all NodePool-related ZNodesnodeRoot
- Prefix of nodespublic static org.apache.curator.framework.CuratorFramework createZKConnection(String connectionString, String zkRoot)
connectionString
- ZooKeeper connection stringzkRoot
- root path to prefix onto all Curator (ZK) requestspublic List<NodePoolNode> acceptNodes(NodeRequest request) throws Exception
request
- node requestException
- on ZooKeeper errorpublic Charset getCharset()
public org.apache.curator.framework.CuratorFramework getConn()
public String getConnectionString()
public String getCredentialsId()
public hudson.model.Descriptor<NodePool> getDescriptor()
getDescriptor
in interface hudson.model.Describable<NodePool>
public com.google.gson.Gson getGson()
public String getLabelPrefix()
public String getNodeRoot()
public String getPriority()
public String getRequestRoot()
public String getRequestor()
public List<NodeRequest> getRequests()
public final String getZooKeeperRoot()
public String nodePoolLabelFromJenkinsLabel(String jenkinsLabel)
jenkinsLabel
- jenkins labelpublic void setConnectionString(String connectionString)
public void setCredentialsId(String credentialsId)
public void setLabelPrefix(String labelPrefix)
public void setNodeRoot(String nodeRoot)
public void setPriority(String priority)
public void setRequestRoot(String requestRoot)
public void setRequestor(String requestor)
public void setRequests(List<NodeRequest> requests)
public void setZooKeeperRoot(String zooKeeperRoot)
Copyright © 2016–2018. All rights reserved.