com.pmease.quickbuild.grid
Class NodeServiceImpl
java.lang.Object
com.pmease.quickbuild.grid.NodeServiceImpl
- All Implemented Interfaces:
- NodeService, SchedulableTask
public class NodeServiceImpl
- extends java.lang.Object
- implements NodeService
Method Summary |
void |
cacheBuildId(java.lang.String requestId,
java.lang.Object resolveResult)
|
void |
cacheBuildStatus(java.lang.Long buildId,
Build.Status buildStatus)
|
void |
createDir(java.lang.String dir)
|
void |
deleteFile(java.lang.String file)
|
void |
execute()
|
java.lang.String |
executeGridJob(byte[] jobBytes,
GridNode taskNode)
|
byte[] |
executeShortJob(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)
|
LiveLog |
getLiveLog(java.lang.Long buildId,
StepPath stepPath,
int fromIndex)
|
NodeCharacteristics |
getNodeCharacteristics()
|
long |
getNodeNanos()
|
WorkspaceFile |
getParentFile(java.lang.Long configurationId,
WorkspaceFile child)
|
Schedule |
getSchedule()
|
java.lang.String |
getWorkspaceDir(java.lang.Long configurationId)
|
java.io.InputStream |
gridJobFinished(byte[] jobBytes,
java.lang.String jobNodeAddress)
|
boolean |
isAbsolute(java.lang.String path)
|
boolean |
isFileExist(java.lang.String path)
|
boolean |
isGridJobActive(java.lang.String taskId,
java.lang.String jobId)
|
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.lang.String taskId,
java.lang.String attributeName,
java.lang.String attributeValue)
|
void |
setUserAttributes(java.lang.Long userId,
java.util.Map<java.lang.String,java.lang.String> userAttributes)
|
void |
stop()
|
boolean |
testGridJob(java.lang.String jobId,
boolean cancel)
|
void |
updateAgentToken(java.lang.String agentToken)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeServiceImpl
public NodeServiceImpl()
getWorkspaceDir
public java.lang.String getWorkspaceDir(java.lang.Long configurationId)
- Specified by:
getWorkspaceDir
in interface NodeService
createDir
public void createDir(java.lang.String dir)
- Specified by:
createDir
in interface NodeService
deleteFile
public void deleteFile(java.lang.String file)
- Specified by:
deleteFile
in interface NodeService
isFileExist
public boolean isFileExist(java.lang.String path)
- Specified by:
isFileExist
in interface NodeService
executeGridJob
public java.lang.String executeGridJob(byte[] jobBytes,
GridNode taskNode)
- Specified by:
executeGridJob
in interface NodeService
executeShortJob
public byte[] executeShortJob(java.lang.Class<? extends NodeJob> jobClass,
byte[] paramBytes)
- Specified by:
executeShortJob
in interface NodeService
isGridJobActive
public boolean isGridJobActive(java.lang.String taskId,
java.lang.String jobId)
- Specified by:
isGridJobActive
in interface NodeService
gridJobFinished
public java.io.InputStream gridJobFinished(byte[] jobBytes,
java.lang.String jobNodeAddress)
- Specified by:
gridJobFinished
in interface NodeService
testGridJob
public boolean testGridJob(java.lang.String jobId,
boolean cancel)
- Specified by:
testGridJob
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:
getLiveLog
public LiveLog getLiveLog(java.lang.Long buildId,
StepPath stepPath,
int fromIndex)
- Specified by:
getLiveLog
in interface NodeService
getNodeNanos
public long getNodeNanos()
- Specified by:
getNodeNanos
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.lang.Long userId,
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.lang.String 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
isAbsolute
public boolean isAbsolute(java.lang.String path)
- Specified by:
isAbsolute
in interface NodeService
Copyright © 2005-2010 PMEase Inc. All Rights Reserved.