Class InMemoryJob
java.lang.Object
org.apache.activemq.broker.scheduler.memory.InMemoryJob
- All Implemented Interfaces:
Job
A simple in memory Job POJO.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
long
getDelay()
int
Gets the total number of times this job has executed.getJobId()
Get the time the job is next due to executelong
byte[]
long
int
long
getStart()
Get the start time as a Date time stringint
hashCode()
void
boolean
isCron()
void
setCronEntry
(String cronEntry) void
setDelay
(long delay) void
setNextTime
(long nextTime) void
setPayload
(byte[] payload) void
setPeriod
(long period) void
setRepeat
(int repeat) void
setStart
(long start) toString()
-
Constructor Details
-
InMemoryJob
-
-
Method Details
-
getJobId
-
getRepeat
public int getRepeat() -
setRepeat
public void setRepeat(int repeat) -
getStart
public long getStart() -
setStart
public void setStart(long start) -
getNextTime
public long getNextTime() -
setNextTime
public void setNextTime(long nextTime) -
getDelay
public long getDelay() -
setDelay
public void setDelay(long delay) -
getPeriod
public long getPeriod() -
setPeriod
public void setPeriod(long period) -
getCronEntry
- Specified by:
getCronEntry
in interfaceJob
- Returns:
- the cron entry
-
setCronEntry
-
getPayload
public byte[] getPayload()- Specified by:
getPayload
in interfaceJob
- Returns:
- the payload
-
setPayload
public void setPayload(byte[] payload) -
getStartTime
Description copied from interface:Job
Get the start time as a Date time string- Specified by:
getStartTime
in interfaceJob
- Returns:
- the date time
-
getNextExecutionTime
Description copied from interface:Job
Get the time the job is next due to execute- Specified by:
getNextExecutionTime
in interfaceJob
- Returns:
- the date time
-
getExecutionCount
public int getExecutionCount()Description copied from interface:Job
Gets the total number of times this job has executed.- Specified by:
getExecutionCount
in interfaceJob
-
incrementExecutionCount
public void incrementExecutionCount() -
decrementRepeatCount
public void decrementRepeatCount() -
isCron
public boolean isCron()- Returns:
- true if this Job represents a Cron entry.
-
hashCode
public int hashCode() -
toString
-