public class SolverHandlerContext extends Object
| Constructor and Description |
|---|
SolverHandlerContext(int queryTimesSize,
long queryMinimumDistance) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNextQueryTime(LocalDateTime nextQueryTime)
Adds a new value to the available query times.
|
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 |
getPreviousQueryTime()
Gets the previously executed query time.
|
boolean |
hasMinimalDistance(LocalDateTime lastQueryTime,
LocalDateTime nextQueryTime)
Indicates if two query times has the minimum configured separation.
|
boolean |
isProcessedChangeSet(long changeSetId) |
boolean |
isProcessedTaskChange(long taskId,
LocalDateTime changeTime)
Indicates if a change has already been processed for a given task.
|
long |
nextChangeSetId() |
LocalDateTime |
peekLastQueryTime() |
LocalDateTime |
pollLastQueryTime()
Retrieves and removes the last available query time.
|
LocalDateTime |
pollNextQueryTime()
Retrieves and removes the first available query time to process.
|
void |
resetQueryTimes(LocalDateTime startValue)
Resets the registered query times by using a start value.
|
void |
setCurrentChangeSetId(long currentChangeSetId) |
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.
|
public SolverHandlerContext(int queryTimesSize,
long queryMinimumDistance)
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 void resetQueryTimes(LocalDateTime startValue)
startValue - the start value for filling the initial query times.public LocalDateTime pollNextQueryTime()
public LocalDateTime pollLastQueryTime()
public LocalDateTime peekLastQueryTime()
public void addNextQueryTime(LocalDateTime nextQueryTime)
nextQueryTime - the value to add.public boolean hasMinimalDistance(LocalDateTime lastQueryTime, LocalDateTime nextQueryTime)
lastQueryTime - the previous query time for the calculation.nextQueryTime - the next query time for the calculation.Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.