Class InMemoryJob
java.lang.Object
org.apache.activemq.broker.scheduler.memory.InMemoryJob
- All Implemented Interfaces:
Job
A simple in memory Job POJO.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlonggetDelay()intGets the total number of times this job has executed.getJobId()Get the time the job is next due to executelongbyte[]longintlonggetStart()Get the start time as a Date time stringinthashCode()voidbooleanisCron()voidsetCronEntry(String cronEntry) voidsetDelay(long delay) voidsetDestinationName(String destinationName) voidsetNextTime(long nextTime) voidsetPayload(byte[] payload) voidsetPeriod(long period) voidsetRepeat(int repeat) voidsetStart(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:
getCronEntryin interfaceJob- Returns:
- the cron entry
-
setCronEntry
-
getPayload
public byte[] getPayload()- Specified by:
getPayloadin interfaceJob- Returns:
- the payload
-
setPayload
public void setPayload(byte[] payload) -
getStartTime
Description copied from interface:JobGet the start time as a Date time string- Specified by:
getStartTimein interfaceJob- Returns:
- the date time
-
getNextExecutionTime
Description copied from interface:JobGet the time the job is next due to execute- Specified by:
getNextExecutionTimein interfaceJob- Returns:
- the date time
-
getExecutionCount
public int getExecutionCount()Description copied from interface:JobGets the total number of times this job has executed.- Specified by:
getExecutionCountin interfaceJob
-
getDestinationName
- Specified by:
getDestinationNamein interfaceJob- Returns:
- name of destination
-
setDestinationName
- Specified by:
setDestinationNamein 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
-