At the moment I am trying to understand the implementation of dynamic priorities in my project.
I have an object, let's call it Request . The object has the time of the last call ( long timeLast ) and the frequency of the call ( double period ). The priority is calculated by the formula - (currentTime(нынешнее время) - timeLast)/period .
I create an ArrayList such objects. I need to get the current priority at each moment of time and, depending on the priority, to sort this ArrayList (the sorting is implemented by a comparator, everything is OK there). How could I realize this, honestly, there are simply no ideas on this. I know about the existence of the EDF algorithm, but it was not possible to find its implementation in the Internet. Thank you very much.