public class RemoteElasticInstanceImpl extends Object implements RemoteElasticInstance
Constructor and Description |
---|
RemoteElasticInstanceImpl(ElasticInstanceManager manager,
ElasticAgentTunnelManager tunnelManager,
ErrorHandler errorHandler,
com.atlassian.aws.AWSAccount awsAccount,
URL baseURL,
int startupTimeoutSeconds,
RemoteElasticInstanceListener listener,
ScheduledExecutorService executor,
KeyStore keyStore,
ElasticConfiguration elasticConfiguration,
AgentManager agentManager,
ElasticImageConfiguration elasticImageConfiguration,
com.atlassian.aws.ec2.InstanceLaunchConfigurationBuilder instanceLaunchConfigurationBuilder,
SpotInstanceConfig spotInstanceConfig,
ServerFingerprint fingerprint,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
Collection<com.atlassian.aws.ec2.EBSVolume> |
getAttachedVolumes() |
ElasticImageConfiguration |
getConfiguration() |
com.atlassian.aws.ec2.RemoteEC2Instance |
getInstance() |
KeyStore |
getKeyStore() |
long |
getRemoteAgent() |
RemoteElasticInstanceState |
getState() |
void |
interruptDelayedTermination()
Interrupts delayed termination process.
|
boolean |
isAgentLoading() |
boolean |
isBeingTerminated() |
boolean |
isShutdownable()
Returns true if the instance is in a state that allows shutdown.
|
void |
restoreInstance(ElasticAgentDefinition elasticAgentDefinition,
com.amazonaws.services.ec2.model.Instance instance)
Restore elastic agent's state after server restart
|
void |
setAgentLoading(boolean agentLoading) |
void |
setRemoteAgent(long agentId) |
void |
setTunnelTimeoutMinutes(int tunnelTimeoutMinutes) |
void |
start() |
void |
terminate() |
void |
triggerDelayedTermination(long delaySeconds)
Triggers delayed termination of elastic instance.
|
public RemoteElasticInstanceImpl(ElasticInstanceManager manager, ElasticAgentTunnelManager tunnelManager, ErrorHandler errorHandler, com.atlassian.aws.AWSAccount awsAccount, URL baseURL, int startupTimeoutSeconds, RemoteElasticInstanceListener listener, ScheduledExecutorService executor, KeyStore keyStore, ElasticConfiguration elasticConfiguration, @NotNull AgentManager agentManager, @NotNull ElasticImageConfiguration elasticImageConfiguration, @NotNull com.atlassian.aws.ec2.InstanceLaunchConfigurationBuilder instanceLaunchConfigurationBuilder, @NotNull SpotInstanceConfig spotInstanceConfig, @NotNull ServerFingerprint fingerprint, @NotNull com.atlassian.event.api.EventPublisher eventPublisher)
public long getRemoteAgent()
getRemoteAgent
in interface RemoteElasticInstance
public void setRemoteAgent(long agentId)
setRemoteAgent
in interface RemoteElasticInstance
agentId
- id of corresponding ElasticAgentDefinition
.public boolean isShutdownable()
RemoteElasticInstance
isShutdownable
in interface RemoteElasticInstance
public boolean isBeingTerminated()
isBeingTerminated
in interface RemoteElasticInstance
public boolean isAgentLoading()
isAgentLoading
in interface RemoteElasticInstance
public void setAgentLoading(boolean agentLoading)
setAgentLoading
in interface RemoteElasticInstance
public void start()
start
in interface RemoteElasticInstance
public void terminate()
terminate
in interface RemoteElasticInstance
public RemoteElasticInstanceState getState()
getState
in interface RemoteElasticInstance
public com.atlassian.aws.ec2.RemoteEC2Instance getInstance()
getInstance
in interface RemoteElasticInstance
@NotNull public Collection<com.atlassian.aws.ec2.EBSVolume> getAttachedVolumes()
getAttachedVolumes
in interface RemoteElasticInstance
@NotNull public ElasticImageConfiguration getConfiguration()
getConfiguration
in interface RemoteElasticInstance
public void triggerDelayedTermination(long delaySeconds)
RemoteElasticInstance
triggerDelayedTermination
in interface RemoteElasticInstance
delaySeconds
- Number of secods to wait before terminating instance.public void interruptDelayedTermination()
RemoteElasticInstance
interruptDelayedTermination
in interface RemoteElasticInstance
public void setTunnelTimeoutMinutes(int tunnelTimeoutMinutes)
public void restoreInstance(ElasticAgentDefinition elasticAgentDefinition, com.amazonaws.services.ec2.model.Instance instance) throws Exception
RemoteElasticInstance
restoreInstance
in interface RemoteElasticInstance
Exception
public KeyStore getKeyStore()
getKeyStore
in interface RemoteElasticInstance
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.