com.pmease.quickbuild.grid
Class NodeServiceImpl

java.lang.Object
  extended by com.pmease.quickbuild.grid.NodeServiceImpl
All Implemented Interfaces:
NodeService, SchedulableTask

public class NodeServiceImpl
extends java.lang.Object
implements NodeService


Field Summary
 
Fields inherited from interface com.pmease.quickbuild.grid.NodeService
instance, SERVICE_PATH
 
Constructor Summary
NodeServiceImpl()
           
 
Method Summary
 void cacheBuildId(java.lang.String requestId, java.lang.Object resolveResult)
           
 void cacheBuildStatus(java.lang.Long buildId, Build.Status buildStatus)
           
 boolean cancelGridJob(java.util.UUID jobId)
           
 void cleanDir(java.lang.String dir)
           
 void copyFileFrom(GridNode fromNode, java.lang.String srcPath, java.lang.String destPath, java.lang.String lockForReadPath, java.lang.String lockForWritePath)
           
 void copyFilesFrom(GridNode fromNode, java.lang.String srcPath, java.lang.String filePatterns, java.lang.String destPath, boolean compress, java.lang.String lockForReadPath, java.lang.String lockForWritePath)
           
 void createDir(java.lang.String dir)
           
 void deleteDir(java.lang.String dir)
           
 void deleteFile(java.lang.String file)
           
 void execute()
           
 void executeGridJob(byte[] jobBytes, GridNode taskNode)
           
 byte[] executeJob(java.lang.Class<? extends NodeJob> jobClass, byte[] paramBytes)
           
 java.lang.Long getBuildId(java.lang.String requestId, long timeout)
          Speed up build id fetching.
 java.lang.String getBuildPublishDir(java.lang.Long buildId)
           
 Build.Status getBuildStatus(java.lang.Long buildId, long timeout)
          Speed up build status fetching.
 java.util.List<WorkspaceFile> getChildFiles(java.lang.Long configurationId, WorkspaceFile parent)
           
 java.lang.String getConfigurationPublishDir(java.lang.Long configurationId)
           
 java.util.List<BuildLogEntry> getLivelogEntries(java.lang.Long buildId, java.util.Date from, java.util.Date to)
           
 NodeCharacteristics getNodeCharacteristics()
           
 WorkspaceFile getParentFile(java.lang.Long configurationId, WorkspaceFile child)
           
 Schedule getSchedule()
           
 java.lang.String getWorkspaceDir(java.lang.Long configurationId)
           
 void gridJobFinished(byte[] jobBytes)
           
 boolean isFileExist(java.lang.String path)
           
 void pluginSettingChanged(java.lang.String pluginId)
           
 void pluginStatusChanged(java.lang.String pluginId)
           
 java.util.List<java.lang.String> readSystemLog(boolean full)
           
 void restart()
           
 void setTaskAttribute(java.util.UUID taskId, java.lang.String attributeName, java.lang.String attributeValue)
           
 void setUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes)
           
 void stop()
           
 void updateAgentToken(java.lang.String agentToken)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeServiceImpl

public NodeServiceImpl()
Method Detail

getWorkspaceDir

public java.lang.String getWorkspaceDir(java.lang.Long configurationId)
Specified by:
getWorkspaceDir in interface NodeService

copyFilesFrom

public void copyFilesFrom(GridNode fromNode,
                          java.lang.String srcPath,
                          java.lang.String filePatterns,
                          java.lang.String destPath,
                          boolean compress,
                          java.lang.String lockForReadPath,
                          java.lang.String lockForWritePath)
Specified by:
copyFilesFrom in interface NodeService

copyFileFrom

public void copyFileFrom(GridNode fromNode,
                         java.lang.String srcPath,
                         java.lang.String destPath,
                         java.lang.String lockForReadPath,
                         java.lang.String lockForWritePath)
Specified by:
copyFileFrom in interface NodeService

createDir

public void createDir(java.lang.String dir)
Specified by:
createDir in interface NodeService

deleteDir

public void deleteDir(java.lang.String dir)
Specified by:
deleteDir in interface NodeService

deleteFile

public void deleteFile(java.lang.String file)
Specified by:
deleteFile in interface NodeService

cleanDir

public void cleanDir(java.lang.String dir)
Specified by:
cleanDir in interface NodeService

isFileExist

public boolean isFileExist(java.lang.String path)
Specified by:
isFileExist in interface NodeService

executeGridJob

public void executeGridJob(byte[] jobBytes,
                           GridNode taskNode)
Specified by:
executeGridJob in interface NodeService

gridJobFinished

public void gridJobFinished(byte[] jobBytes)
Specified by:
gridJobFinished in interface NodeService

cancelGridJob

public boolean cancelGridJob(java.util.UUID jobId)
Specified by:
cancelGridJob in interface NodeService

execute

public void execute()
Specified by:
execute in interface SchedulableTask

getSchedule

public Schedule getSchedule()
Specified by:
getSchedule in interface SchedulableTask

cacheBuildStatus

public void cacheBuildStatus(java.lang.Long buildId,
                             Build.Status buildStatus)
Specified by:
cacheBuildStatus in interface NodeService

cacheBuildId

public void cacheBuildId(java.lang.String requestId,
                         java.lang.Object resolveResult)
Specified by:
cacheBuildId in interface NodeService

getBuildId

public java.lang.Long getBuildId(java.lang.String requestId,
                                 long timeout)
Description copied from interface: NodeService
Speed up build id fetching.

Specified by:
getBuildId in interface NodeService
Returns:

getBuildStatus

public Build.Status getBuildStatus(java.lang.Long buildId,
                                   long timeout)
Description copied from interface: NodeService
Speed up build status fetching.

Specified by:
getBuildStatus in interface NodeService
Returns:

executeJob

public byte[] executeJob(java.lang.Class<? extends NodeJob> jobClass,
                         byte[] paramBytes)
Specified by:
executeJob in interface NodeService

getLivelogEntries

public java.util.List<BuildLogEntry> getLivelogEntries(java.lang.Long buildId,
                                                       java.util.Date from,
                                                       java.util.Date to)
Specified by:
getLivelogEntries in interface NodeService

restart

public void restart()
Specified by:
restart in interface NodeService

stop

public void stop()
Specified by:
stop in interface NodeService

setUserAttributes

public void setUserAttributes(java.util.Map<java.lang.String,java.lang.String> userAttributes)
Specified by:
setUserAttributes in interface NodeService

pluginSettingChanged

public void pluginSettingChanged(java.lang.String pluginId)
Specified by:
pluginSettingChanged in interface NodeService

pluginStatusChanged

public void pluginStatusChanged(java.lang.String pluginId)
Specified by:
pluginStatusChanged in interface NodeService

getChildFiles

public java.util.List<WorkspaceFile> getChildFiles(java.lang.Long configurationId,
                                                   WorkspaceFile parent)
Specified by:
getChildFiles in interface NodeService

getParentFile

public WorkspaceFile getParentFile(java.lang.Long configurationId,
                                   WorkspaceFile child)
Specified by:
getParentFile in interface NodeService

readSystemLog

public java.util.List<java.lang.String> readSystemLog(boolean full)
Specified by:
readSystemLog in interface NodeService

setTaskAttribute

public void setTaskAttribute(java.util.UUID taskId,
                             java.lang.String attributeName,
                             java.lang.String attributeValue)
Specified by:
setTaskAttribute in interface NodeService

getBuildPublishDir

public java.lang.String getBuildPublishDir(java.lang.Long buildId)
Specified by:
getBuildPublishDir in interface NodeService

getConfigurationPublishDir

public java.lang.String getConfigurationPublishDir(java.lang.Long configurationId)
Specified by:
getConfigurationPublishDir in interface NodeService

updateAgentToken

public void updateAgentToken(java.lang.String agentToken)
Specified by:
updateAgentToken in interface NodeService

getNodeCharacteristics

public NodeCharacteristics getNodeCharacteristics()
Specified by:
getNodeCharacteristics in interface NodeService


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.