|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.kernel.ScheduledTaskImpl.Builder
static class ScheduledTaskImpl.Builder
We use the builder pattern here to avoid constructor explosion.
This builder takes three required parameters, task,
owner, and priority and then provides setter methods
for each of the remaining optional parameters for building a
ScheduledTaskImpl object.
Example usage:
ScheduledTaskImpl task = new ScheduledTaskImpl.Builder(
task, owner, priority).period(1000).build();
| Constructor Summary | |
|---|---|
ScheduledTaskImpl.Builder(KernelRunnable task,
Identity owner,
Priority priority)
Constructs a Builder object that takes three required
parameters for building a ScheduledTaskImpl. |
|
ScheduledTaskImpl.Builder(ScheduledTaskImpl task)
Constructs a Builder object to build a
ScheduledTaskImpl object with all of the same values as the
given task except for the startTime, timeout, and
maxConcurrency which are set to their default values. |
|
| Method Summary | |
|---|---|
(package private) ScheduledTaskImpl |
build()
Builds a ScheduledTaskImpl object from the attributes
in this builder. |
(package private) ScheduledTaskImpl.Builder |
period(long period)
Setter for setting the period of a new ScheduledTaskImpl |
(package private) static void |
setDefaultTimeout(long timeout)
Set the default value of timeout for new instances
of ScheduledTaskImpl built with a builder. |
(package private) ScheduledTaskImpl.Builder |
startTime(long startTime)
Setter for setting the start time of a new ScheduledTaskImpl. |
(package private) ScheduledTaskImpl.Builder |
timeout(long timeout)
Setter for setting the timeout of a new ScheduledTaskImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
ScheduledTaskImpl.Builder(KernelRunnable task,
Identity owner,
Priority priority)
Builder object that takes three required
parameters for building a ScheduledTaskImpl.
task - the KernelRunnable to runowner - the Identity of the task ownerpriority - the Priority of the taskScheduledTaskImpl.Builder(ScheduledTaskImpl task)
Builder object to build a
ScheduledTaskImpl object with all of the same values as the
given task except for the startTime, timeout, and
maxConcurrency which are set to their default values.
task - existing ScheduledTaskImpl| Method Detail |
|---|
ScheduledTaskImpl.Builder startTime(long startTime)
ScheduledTaskImpl.
startTime - the time at which to start in milliseconds since
January 1, 1970
Builder objectScheduledTaskImpl.Builder period(long period)
ScheduledTaskImpl
period - the delay between recurring executions, or
NON_RECURRING
Builder objectScheduledTaskImpl.Builder timeout(long timeout)
ScheduledTaskImpl
timeout - the transaction timeout to use for this task or
UNBOUNDED
Builder objectstatic void setDefaultTimeout(long timeout)
timeout for new instances
of ScheduledTaskImpl built with a builder.
timeout - default value of timeoutScheduledTaskImpl build()
ScheduledTaskImpl object from the attributes
in this builder.
ScheduledTaskImpl object
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||