Class SolverHandlerContext


  • public class SolverHandlerContext
    extends Object
    • Constructor Detail

      • SolverHandlerContext

        public SolverHandlerContext​(Duration queryShift)
    • Method Detail

      • getCurrentChangeSetId

        public long getCurrentChangeSetId()
      • setCurrentChangeSetId

        public void setCurrentChangeSetId​(long currentChangeSetId)
      • nextChangeSetId

        public long nextChangeSetId()
      • isProcessedChangeSet

        public boolean isProcessedChangeSet​(long changeSetId)
      • isCurrentChangeSetProcessed

        public boolean isCurrentChangeSetProcessed()
      • setProcessedChangeSet

        public void setProcessedChangeSet​(long changeSetId)
      • clearProcessedChangeSet

        public void clearProcessedChangeSet()
      • setTaskChangeTime

        public void setTaskChangeTime​(long taskId,
                                      LocalDateTime changeTime)
        Registers the time of the last change processed for a task.
        Parameters:
        taskId - identifier of the task to register.
        changeTime - the task change time to register.
      • isProcessedTaskChange

        public boolean isProcessedTaskChange​(long taskId,
                                             LocalDateTime changeTime)
        Indicates if a change has already been processed for a given task.
        Parameters:
        taskId - identifier of the task to query.
        changeTime - the task change time to query.
        Returns:
        true if the change has already been processed, false in any other case.
      • clearTaskChangeTimes

        public void clearTaskChangeTimes​(LocalDateTime untilLocalDateTime)
        Removes all the registered task change times that occurred strictly before a given time.
        Parameters:
        untilLocalDateTime - the time for filtering the changes to remove.
      • clearTaskChangeTimes

        public void clearTaskChangeTimes()
        Removes all the registered task time changes.
      • getPreviousQueryTime

        public LocalDateTime getPreviousQueryTime()
        Gets the previously executed query time.
        Returns:
        the previously executed query time
      • setPreviousQueryTime

        public void setPreviousQueryTime​(LocalDateTime previousQueryTime)
        Sets the previously executed query time.
        Parameters:
        previousQueryTime - the query time to set.
      • getNextQueryTime

        public LocalDateTime getNextQueryTime()
        Gets the next query time to use.
        Returns:
        the query time.
      • setNextQueryTime

        public void setNextQueryTime​(LocalDateTime nextQueryTime)
        Sets the next query time to use.
        Parameters:
        nextQueryTime - the query time to set.
      • shiftQueryTime

        public LocalDateTime shiftQueryTime​(LocalDateTime queryTime)
        Shifts a queryTime with the context configured queryShift.
        Parameters:
        queryTime - a query time to shift.
        Returns:
        the shifted query time or null if a null value is provided.