Package io.jenkins.plugins.yc
Class YCAbstractSlave
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Node
-
- hudson.model.Slave
-
- io.jenkins.plugins.yc.YCAbstractSlave
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Node>
,ModelObject
,ReconfigurableDescribable<Node>
,Saveable
,SearchableModelObject
,SearchItem
,AccessControlled
,Serializable
,OnMaster
- Direct Known Subclasses:
YCOndemandSlave
public abstract class YCAbstractSlave extends Slave
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
YCAbstractSlave.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptor
-
Nested classes/interfaces inherited from class hudson.model.Node
Node.InternalComputerListener, Node.Mode
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description protected yandex.cloud.api.compute.v1.InstanceOuterClass.Instance
lastFetchInstance
protected long
lastFetchTime
protected long
launchTimeout
protected static long
MIN_FETCH_TIME
protected ResettableCountDownLatch
terminateScheduled
Terminate was scheduled.-
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave, SKIP_BUILD_CHECK_ON_FLYWEIGHTS
-
-
Constructor Summary
Constructors Constructor Description YCAbstractSlave(String name, String instanceId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy<YCComputer> retentionStrategy, String initScript, String tmpDir, List<? extends NodeProperty<?>> nodeProperties, boolean stopOnTerminate, String idleTerminationMinutes, List<YCTag> tags, String cloudName, long launchTimeout)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Computer
createComputer()
Secret
getAdminPassword()
YandexCloud
getCloud()
String
getCloudName()
String
getIdleTerminationMinutes()
String
getInitScript()
String
getInstanceId()
long
getLaunchTimeoutInMillis()
int
getSshPort()
boolean
getStopOnTerminate()
List<YCTag>
getTags()
String
getTemplateDescription()
String
getTmpDir()
boolean
isAcceptingTasks()
protected boolean
isAlive(boolean force)
boolean
isConnected()
boolean
isSpecifyPassword()
boolean
isStopOnTerminate()
void
onConnected()
Called when the agent is connected to Jenkins.protected Object
readResolve()
Node
reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form)
abstract void
terminate()
-
Methods inherited from class hudson.model.Slave
createLauncher, equals, getClockDifferenceCallable, getComputer, getDescriptor, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRetentionStrategy, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, setLabelString, setLauncher, setMode, setNodeDescription, setNodeName, setNodeProperties, setNumExecutors, setRetentionStrategy, setUserId, toString
-
Methods inherited from class hudson.model.Node
canTake, canTake, createPath, getACL, getAssignedLabels, getChannel, getClockDifference, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodeProperty, getNodeProperty, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, getTemporaryOfflineCause, isHoldOffLaunchUntilSave, save, toComputer
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
-
-
-
Field Detail
-
lastFetchInstance
protected transient yandex.cloud.api.compute.v1.InstanceOuterClass.Instance lastFetchInstance
-
lastFetchTime
protected transient long lastFetchTime
-
terminateScheduled
protected transient ResettableCountDownLatch terminateScheduled
Terminate was scheduled.
-
MIN_FETCH_TIME
protected static final long MIN_FETCH_TIME
-
launchTimeout
protected final long launchTimeout
-
-
Constructor Detail
-
YCAbstractSlave
public YCAbstractSlave(String name, String instanceId, String templateDescription, String remoteFS, int numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy<YCComputer> retentionStrategy, String initScript, String tmpDir, List<? extends NodeProperty<?>> nodeProperties, boolean stopOnTerminate, String idleTerminationMinutes, List<YCTag> tags, String cloudName, long launchTimeout) throws Descriptor.FormException, IOException
- Throws:
Descriptor.FormException
IOException
-
-
Method Detail
-
readResolve
protected Object readResolve()
- Overrides:
readResolve
in classSlave
-
getCloud
public YandexCloud getCloud()
-
getInstanceId
public String getInstanceId()
-
createComputer
public Computer createComputer()
- Overrides:
createComputer
in classSlave
-
terminate
public abstract void terminate()
-
reconfigure
public Node reconfigure(@NonNull org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) throws Descriptor.FormException
- Specified by:
reconfigure
in interfaceReconfigurableDescribable<Node>
- Overrides:
reconfigure
in classNode
- Throws:
Descriptor.FormException
-
isAcceptingTasks
public boolean isAcceptingTasks()
- Overrides:
isAcceptingTasks
in classNode
-
getLaunchTimeoutInMillis
public long getLaunchTimeoutInMillis()
-
getSshPort
public int getSshPort()
-
getStopOnTerminate
public boolean getStopOnTerminate()
-
getAdminPassword
public Secret getAdminPassword()
-
isSpecifyPassword
public boolean isSpecifyPassword()
-
getInitScript
public String getInitScript()
-
getTmpDir
public String getTmpDir()
-
getTemplateDescription
public String getTemplateDescription()
-
isStopOnTerminate
public boolean isStopOnTerminate()
-
getIdleTerminationMinutes
public String getIdleTerminationMinutes()
-
isConnected
public boolean isConnected()
-
getCloudName
public String getCloudName()
-
onConnected
public void onConnected()
Called when the agent is connected to Jenkins.
-
-