Groovy Documentation

org.linkedin.glu.orchestration.engine.commands
[Groovy] Class CommandsServiceImpl

java.lang.Object
  org.linkedin.glu.orchestration.engine.commands.CommandsServiceImpl
All Implemented Interfaces:
CommandsService

class CommandsServiceImpl

Authors:
yan@pongasoft.com


Field Summary
static java.lang.String MODULE

static Logger log

 
Property Summary
AgentsService agentsService

AuthorizationService authorizationService

Clock clock

MemorySize commandExecutionFirstBytesSize

using 255 by default because that is what a String in GORM can hold

CommandExecutionIOStorage commandExecutionIOStorage

CommandExecutionStorage commandExecutionStorage

java.lang.Object createGluCommand

Factory to create a command (first try to read it from the db or store it first in the db)

Timespan defaultInterruptTimeout

This timeout represents how long to we are willing to wait for the command to wait for the interrupt to propagate before we interrupt it on this side

Timespan defaultSynchronousWaitTimeout

This timeout represents how long to we are willing to wait for the command to complete before returning.

PluginService pluginService

Submitter submitter

Timespan timeout

the timeout for waiting for command to complete

 
Method Summary
CommandExecution doExecuteShellCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args, groovy.lang.Closure onResultStreamAvailable)

Executes the command asynchronously

java.lang.String executeShellCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)

DbCommandExecution findCommandExecution(Fabric fabric, java.lang.String commandId)

java.util.Map findCommandExecutions(Fabric fabric, java.lang.String agentName, java.lang.Object params)

java.util.Map findCurrentCommandExecutions(java.util.Collection commandIds = null)

boolean interruptCommand(Fabric fabric, java.lang.String agentName, java.lang.String commandId)

void setCommandExecutionIOStorage(CommandExecutionIOStorage storage)

This is somewhat hacky but cannot do it in spring due to circular reference...

java.lang.Object withCommandExecutionAndWithOrWithoutStreams(Fabric fabric, java.lang.String commandId, java.lang.Object args, groovy.lang.Closure closure)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

MODULE

public static final java.lang.String MODULE


log

public static final Logger log


 
Property Detail

agentsService

@Initializable(required = true)
AgentsService agentsService


authorizationService

@Initializable
AuthorizationService authorizationService


clock

@Initializable
Clock clock


commandExecutionFirstBytesSize

@Initializable(required = true)
MemorySize commandExecutionFirstBytesSize
using 255 by default because that is what a String in GORM can hold


commandExecutionIOStorage

@Initializable(required = true)
CommandExecutionIOStorage commandExecutionIOStorage


commandExecutionStorage

@Initializable(required = true)
CommandExecutionStorage commandExecutionStorage


createGluCommand

java.lang.Object createGluCommand
Factory to create a command (first try to read it from the db or store it first in the db)


defaultInterruptTimeout

@Initializable
Timespan defaultInterruptTimeout
This timeout represents how long to we are willing to wait for the command to wait for the interrupt to propagate before we interrupt it on this side


defaultSynchronousWaitTimeout

@Initializable
Timespan defaultSynchronousWaitTimeout
This timeout represents how long to we are willing to wait for the command to complete before returning. The command will still complete in the background... this allows "fast" commands to be handled more naturally in the UI.


pluginService

@Initializable(required = true)
PluginService pluginService


submitter

@Initializable
Submitter submitter


timeout

@Initializable(required = false)
Timespan timeout
the timeout for waiting for command to complete


 
Method Detail

doExecuteShellCommand

CommandExecution doExecuteShellCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args, groovy.lang.Closure onResultStreamAvailable)
Executes the command asynchronously


executeShellCommand

@Override
java.lang.String executeShellCommand(Fabric fabric, java.lang.String agentName, java.lang.Object args)


findCommandExecution

@Override
DbCommandExecution findCommandExecution(Fabric fabric, java.lang.String commandId)


findCommandExecutions

@Override
java.util.Map findCommandExecutions(Fabric fabric, java.lang.String agentName, java.lang.Object params)


findCurrentCommandExecutions

@Override
java.util.Map findCurrentCommandExecutions(java.util.Collection commandIds = null)


interruptCommand

@Override
boolean interruptCommand(Fabric fabric, java.lang.String agentName, java.lang.String commandId)


setCommandExecutionIOStorage

void setCommandExecutionIOStorage(CommandExecutionIOStorage storage)
This is somewhat hacky but cannot do it in spring due to circular reference...


withCommandExecutionAndWithOrWithoutStreams

@Override
java.lang.Object withCommandExecutionAndWithOrWithoutStreams(Fabric fabric, java.lang.String commandId, java.lang.Object args, groovy.lang.Closure closure)


 

Groovy Documentation