Brooklyn

brooklyn.util.task
[Java] Class ScheduledTask

java.lang.Object
  brooklyn.util.task.BasicTaskStub
      brooklyn.util.task.BasicTask
          brooklyn.util.task.ScheduledTask

public class ScheduledTask
extends BasicTask

Field Summary
protected groovy.time.TimeDuration delay

initial delay before running, set as flag in constructor; defaults to 0

protected java.lang.Integer maxIterations

optional, set as flag in constructor; defaults to null meaning no limit

protected Task nextRun

protected groovy.time.TimeDuration period

time to wait between executions, or null if not to repeat (default), set as flag to constructor; this may be modified for subsequent submissions by a running task generated by the factory using getSubmittedByTask().setPeriod(TimeDuration)

protected Task recentRun

protected int runCount

 
Fields inherited from class BasicTask
blockingDetails, description, displayName, em, endTimeUtc, job, log, result, startTimeUtc, submitTimeUtc, submittedByTask, tags, thread
 
Constructor Summary
ScheduledTask(java.util.concurrent.Callable taskFactory)

ScheduledTask(java.util.Map flags, java.util.concurrent.Callable taskFactory)

 
Method Summary
void blockUntilEnded()

void blockUntilFirstScheduleStarted()

java.lang.Object get()

gets the value of the most recently run task

protected java.lang.String getActiveTaskStatusString(int verbosity)

java.util.concurrent.ScheduledFuture getNextScheduled()

int getRunCount()

java.util.concurrent.Callable getTaskFactory()

boolean isDone()

Task newTask()

 
Methods inherited from class BasicTask
blockUntilEnded, blockUntilStarted, cancel, cancel, get, get, getActiveTaskStatusString, getBlockingDetails, getDescription, getDisplayName, getEndTimeUtc, getExtraStatusText, getResult, getStartTimeUtc, getStatusDetail, getStatusString, getStatusSummary, getSubmitTimeUtc, getSubmittedByTask, getTags, getThread, isBegun, isCancelled, isDone, isError, isSubmitted, lookup, setBlockingDetails, setExtraStatusText, toString
 
Methods inherited from class BasicTaskStub
equals, getId, hashCode, toString
 

Field Detail

delay

protected groovy.time.TimeDuration delay
initial delay before running, set as flag in constructor; defaults to 0


maxIterations

protected java.lang.Integer maxIterations
optional, set as flag in constructor; defaults to null meaning no limit


nextRun

protected Task nextRun


period

protected groovy.time.TimeDuration period
time to wait between executions, or null if not to repeat (default), set as flag to constructor; this may be modified for subsequent submissions by a running task generated by the factory using getSubmittedByTask().setPeriod(TimeDuration)


recentRun

protected Task recentRun


runCount

protected int runCount


 
Constructor Detail

ScheduledTask

public ScheduledTask(java.util.concurrent.Callable taskFactory)


ScheduledTask

public ScheduledTask(java.util.Map flags, java.util.concurrent.Callable taskFactory)


 
Method Detail

blockUntilEnded

public void blockUntilEnded()


blockUntilFirstScheduleStarted

public void blockUntilFirstScheduleStarted()


get

public java.lang.Object get()
gets the value of the most recently run task


getActiveTaskStatusString

protected java.lang.String getActiveTaskStatusString(int verbosity)


getNextScheduled

public java.util.concurrent.ScheduledFuture getNextScheduled()


getRunCount

public int getRunCount()


getTaskFactory

public java.util.concurrent.Callable getTaskFactory()


isDone

de
	public
public boolean isDone()


newTask

public Task newTask()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.