Class InMemoryJob
- java.lang.Object
-
- org.apache.activemq.broker.scheduler.memory.InMemoryJob
-
- All Implemented Interfaces:
Job
public class InMemoryJob extends Object implements Job
A simple in memory Job POJO.
-
-
Constructor Summary
Constructors Constructor Description InMemoryJob(String jobId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decrementRepeatCount()
String
getCronEntry()
long
getDelay()
int
getExecutionCount()
Gets the total number of times this job has executed.String
getJobId()
String
getNextExecutionTime()
Get the time the job is next due to executelong
getNextTime()
byte[]
getPayload()
long
getPeriod()
int
getRepeat()
long
getStart()
String
getStartTime()
Get the start time as a Date time stringint
hashCode()
void
incrementExecutionCount()
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)
String
toString()
-
-
-
Constructor Detail
-
InMemoryJob
public InMemoryJob(String jobId)
-
-
Method Detail
-
setRepeat
public void setRepeat(int repeat)
-
setStart
public void setStart(long start)
-
getNextTime
public long getNextTime()
-
setNextTime
public void setNextTime(long nextTime)
-
setDelay
public void setDelay(long delay)
-
setPeriod
public void setPeriod(long period)
-
getCronEntry
public String getCronEntry()
- Specified by:
getCronEntry
in interfaceJob
- Returns:
- the cron entry
-
setCronEntry
public void setCronEntry(String cronEntry)
-
getPayload
public byte[] getPayload()
- Specified by:
getPayload
in interfaceJob
- Returns:
- the payload
-
setPayload
public void setPayload(byte[] payload)
-
getStartTime
public String 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
public String 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.
-
-