com.pmease.quickbuild.grid
Interface Grid

All Superinterfaces:
SchedulableTask
All Known Implementing Classes:
GridImpl

public interface Grid
extends SchedulableTask


Field Summary
static Grid instance
           
 
Method Summary
 void addJob(GridJob job)
           
<T,R> GridTaskFuture<R>
execute(GridTask<T,R> task, T arg)
           
 java.util.Collection<GridNode> getAllNodes()
           
 java.util.List<java.lang.String> getAttributeNames()
           
 GridJob getJob(java.lang.String jobId)
           
 java.util.Collection<GridJob> getJobs()
           
 GridNode getLocalNode()
           
 GridNode getNode(java.lang.String nodeAddress)
           
 GridNode getNode(java.util.UUID nodeId)
           
 java.util.Collection<GridNode> getRemoteNodes()
           
 GridNode getServerNode()
           
 GridTaskFuture<?> getTaskFuture(java.lang.String taskId)
           
 GridNode getUserNode(User user)
           
 boolean hasJobs()
           
 boolean isJobStarted(java.lang.String jobId)
           
 void removeJob(java.lang.String jobId)
           
 void transferFile(GridNode fromNode, java.lang.String srcFile, GridNode toNode, java.lang.String destFile, java.lang.String lockForReadPath, java.lang.String lockForWritePath)
           
 void transferFiles(GridNode fromNode, java.lang.String srcDir, java.lang.String filePatterns, GridNode toNode, java.lang.String destDir, boolean compress, java.lang.String lockForReadPath, java.lang.String lockForWritePath)
          Transfer files from one node to another.
 
Methods inherited from interface com.pmease.quickbuild.taskschedule.SchedulableTask
execute, getSchedule
 

Field Detail

instance

static final Grid instance
Method Detail

execute

<T,R> GridTaskFuture<R> execute(GridTask<T,R> task,
                                T arg)

getAllNodes

java.util.Collection<GridNode> getAllNodes()

getLocalNode

GridNode getLocalNode()
Get local grid node


getNode

GridNode getNode(java.util.UUID nodeId)

getNode

GridNode getNode(java.lang.String nodeAddress)
Get grid node of specified address.


getUserNode

GridNode getUserNode(User user)

getRemoteNodes

java.util.Collection<GridNode> getRemoteNodes()

getServerNode

GridNode getServerNode()
Get server node.


transferFiles

void transferFiles(GridNode fromNode,
                   java.lang.String srcDir,
                   java.lang.String filePatterns,
                   GridNode toNode,
                   java.lang.String destDir,
                   boolean compress,
                   java.lang.String lockForReadPath,
                   java.lang.String lockForWritePath)
Transfer files from one node to another.

Parameters:
fromNode -
srcDir - absolute path of the source directory on \"from node\".
filePatterns - patterns of files to transfer. Null value means to transfer all files
toNode -
destDir - absolute path of the dest directory on \"to node\". Please note that this absolute path must be separated by the slash character (\"/\")
compress -
lockForReadPath -
lockForWritePath -

transferFile

void transferFile(GridNode fromNode,
                  java.lang.String srcFile,
                  GridNode toNode,
                  java.lang.String destFile,
                  java.lang.String lockForReadPath,
                  java.lang.String lockForWritePath)

getTaskFuture

GridTaskFuture<?> getTaskFuture(java.lang.String taskId)

getJob

GridJob getJob(java.lang.String jobId)

addJob

void addJob(GridJob job)

removeJob

void removeJob(java.lang.String jobId)

isJobStarted

boolean isJobStarted(java.lang.String jobId)

getJobs

java.util.Collection<GridJob> getJobs()

hasJobs

boolean hasJobs()

getAttributeNames

java.util.List<java.lang.String> getAttributeNames()
Get all attribute names in ascending order.



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