org.syrup
Interface PTask

All Superinterfaces:
Task
All Known Subinterfaces:
PTaskTemplate
All Known Implementing Classes:
PTaskImpl, PTaskTemplateImpl

public interface PTask
extends Task

A persistent Task that is held by a WorkSpace.

Author:
Robbert van Dalen

Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 long creationTime()
          Returns the creation time of a PTask.
 boolean done()
          Returns true if this PTask is done.
 boolean executable()
          Returns true if this PTask is executable.
 boolean isParent()
          Returns true if this PTask is a parent.
 java.lang.String key()
          Returns the key that the WorkSpace uses to identify a PTask.
 long modifications()
          Returns the number of modifications since creation.
 long modificationTime()
          Returns the last modification time since creation.
 java.lang.String parentKey()
          Returns the parent identifier.
 java.lang.String worker()
          Returns the Worker's address (URL) that is currently executing this PTask.
 
Methods inherited from interface org.syrup.Task
description, environment, functionClass, name, orType, parameter
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

parentKey

public java.lang.String parentKey()
Returns the parent identifier. The parent of a PTask is fixed and cannot change during the life-cyle of a Workspace.

Returns:
The parent identifier key.
See Also:
key()

key

public java.lang.String key()
Returns the key that the WorkSpace uses to identify a PTask. This identifier is fixed and cannot change during the life-cyle of a Workspace.

Returns:
The identifier key.

modifications

public long modifications()
Returns the number of modifications since creation. Because PTasks can be executed multiple times, this number can more then 1. Note that the number of modifications can only increase during the life-cyle of a Workspace.

Returns:
The number of modifications since creation.

modificationTime

public long modificationTime()
Returns the last modification time since creation. This changes when the number of modifications is increased.

Returns:
The last modification time since creation.

creationTime

public long creationTime()
Returns the creation time of a PTask. This is fixed and cannot change during the life-cyle of a Workspace.


executable

public boolean executable()
Returns true if this PTask is executable.

Returns:
true if this PTask is executable.

done

public boolean done()
Returns true if this PTask is done. When a PTask is done, it will be indefinitely during the life-cyle of a Workspace.

Returns:
true if this PTask is done.

isParent

public boolean isParent()
Returns true if this PTask is a parent. When a PTask is made parent, it will be indefinitely during the life-cyle of a Workspace.

Returns:
true if this PTask is a parent.

worker

public java.lang.String worker()
Returns the Worker's address (URL) that is currently executing this PTask.

Returns:
The Worker's address executing this PTask.