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 classYCAbstractSlave.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.InstancelastFetchInstanceprotected longlastFetchTimeprotected longlaunchTimeoutprotected static longMIN_FETCH_TIMEprotected ResettableCountDownLatchterminateScheduledTerminate 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 ComputercreateComputer()SecretgetAdminPassword()YandexCloudgetCloud()StringgetCloudName()StringgetIdleTerminationMinutes()StringgetInitScript()StringgetInstanceId()longgetLaunchTimeoutInMillis()intgetSshPort()booleangetStopOnTerminate()List<YCTag>getTags()StringgetTemplateDescription()StringgetTmpDir()booleanisAcceptingTasks()protected booleanisAlive(boolean force)booleanisConnected()booleanisSpecifyPassword()booleanisStopOnTerminate()voidonConnected()Called when the agent is connected to Jenkins.protected ObjectreadResolve()Nodereconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form)abstract voidterminate()-
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.FormExceptionIOException
-
-
Method Detail
-
readResolve
protected Object readResolve()
- Overrides:
readResolvein classSlave
-
getCloud
public YandexCloud getCloud()
-
getInstanceId
public String getInstanceId()
-
createComputer
public Computer createComputer()
- Overrides:
createComputerin 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:
reconfigurein interfaceReconfigurableDescribable<Node>- Overrides:
reconfigurein classNode- Throws:
Descriptor.FormException
-
isAcceptingTasks
public boolean isAcceptingTasks()
- Overrides:
isAcceptingTasksin 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.
-
-