@EReplyInfo(replyMessageClasses=TimerReply.class) @ELocalOnly public final class TimerRequest extends ERequestMessage implements java.io.Serializable
TimerRequest.builder()
.timerName("name")
.time(Instant)
.build()
a one-shot timer scheduled to expire on a given date and
time.
TimerRequest.builder()
.timerName("name")
.delay(long)
.build()
a one-shot timer scheduled to expire after the specified
millisecond delay.
TimerRequest.builder()
.timerName("name")
.time(Instant)
.period(long)
.fixedRate(boolean)
.build()
a repeating timer which first expires on a given date and
time and after that on a periodic millisecond rate. If the
fixedRate
parameter is true
, then the
timer is scheduled using
Timer.scheduleAtFixedRate(java.util.TimerTask, Date, long)
.
Otherwise, the timer is scheduled using
Timer.schedule(java.util.TimerTask, Date, long)
.
TimerRequest.builder()
.timerName("name")
.delay(long)
.period(long)
.fixedRate(boolean)
.build()
a repeating timer which first expires after a specified
millisecond delay and then on a periodic millisecond rate.
if fixedRate
parameter is true
, then the
timer is scheduled using
Timer.scheduleAtFixedRate(java.util.TimerTask, Date, long)
.
Otherwise, the timer is scheduled using
Timer.schedule(java.util.TimerTask, Date, long)
.
Modifier and Type | Class and Description |
---|---|
static class |
TimerRequest.Builder
TimerRequest builder. |
EMessage.MessageType
Modifier and Type | Field and Description |
---|---|
long |
delay
If this timer is to expire after a millisecond delay, then
set this value.
|
boolean |
fixedRate
If
true , then repeating timers are run using fixed
rate scheduling. |
long |
period
If this timer is repeating, then set this millisecond
period.
|
java.time.Instant |
time
If this timer is to expire at a given time, then set this
value.
|
java.lang.String |
timerName
The requestor-assigned name for this timer request.
|
MAX_SUBJECT_LENGTH, subject, timestamp
Modifier and Type | Method and Description |
---|---|
static TimerRequest.Builder |
builder()
Returns a timer request builder instance.
|
java.lang.String |
toString()
Returns a textual representation of this timer request
message.
|
equals, hashCode, isApplicationMessage, isSystemMessage, key, messageType
public final java.lang.String timerName
public final java.time.Instant time
null
and specify a
delay
.public final long delay
time
.public final long period
public final boolean fixedRate
true
, then repeating timers are run using fixed
rate scheduling.Timer.scheduleAtFixedRate(java.util.TimerTask, Date, long)
,
Timer.scheduleAtFixedRate(java.util.TimerTask, long, long)
public java.lang.String toString()
public static TimerRequest.Builder builder()
Copyright © 2001 - 2024. Charles W. Rapp. All rights reserved.