public class SolverHandlerContext extends Object
| Constructor and Description |
|---|
SolverHandlerContext(Duration queryShift) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearProcessedChangeSet() |
void |
clearTaskChangeTimes()
Removes all the registered task time changes.
|
void |
clearTaskChangeTimes(LocalDateTime untilLocalDateTime)
Removes all the registered task change times that occurred strictly before a given time.
|
long |
getCurrentChangeSetId() |
LocalDateTime |
getNextQueryTime()
Gets the next query time to use.
|
LocalDateTime |
getPreviousQueryTime()
Gets the previously executed query time.
|
boolean |
isProcessedChangeSet(long changeSetId) |
boolean |
isProcessedTaskChange(long taskId,
LocalDateTime changeTime)
Indicates if a change has already been processed for a given task.
|
long |
nextChangeSetId() |
void |
setCurrentChangeSetId(long currentChangeSetId) |
void |
setNextQueryTime(LocalDateTime nextQueryTime)
Sets the next query time to use.
|
void |
setPreviousQueryTime(LocalDateTime previousQueryTime)
Sets the previously executed query time.
|
void |
setProcessedChangeSet(long changeSetId) |
void |
setTaskChangeTime(long taskId,
LocalDateTime changeTime)
Registers the time of the last change processed for a task.
|
LocalDateTime |
shiftQueryTime(LocalDateTime queryTime)
Shifts a queryTime with the context configured queryShift.
|
public SolverHandlerContext(Duration queryShift)
public long getCurrentChangeSetId()
public void setCurrentChangeSetId(long currentChangeSetId)
public long nextChangeSetId()
public boolean isProcessedChangeSet(long changeSetId)
public void setProcessedChangeSet(long changeSetId)
public void clearProcessedChangeSet()
public void setTaskChangeTime(long taskId,
LocalDateTime changeTime)
taskId - identifier of the task to register.changeTime - the task change time to register.public boolean isProcessedTaskChange(long taskId,
LocalDateTime changeTime)
taskId - identifier of the task to query.changeTime - the task change time to query.public void clearTaskChangeTimes(LocalDateTime untilLocalDateTime)
untilLocalDateTime - the time for filtering the changes to remove.public void clearTaskChangeTimes()
public LocalDateTime getPreviousQueryTime()
public void setPreviousQueryTime(LocalDateTime previousQueryTime)
previousQueryTime - the query time to set.public LocalDateTime getNextQueryTime()
public void setNextQueryTime(LocalDateTime nextQueryTime)
nextQueryTime - the query time to set.public LocalDateTime shiftQueryTime(LocalDateTime queryTime)
queryTime - a query time to shift.Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.