public class SortedHarvestTimepointMap
extends Object
This class represents a high-level type for the items retrieved in
a MemberNode harvest. It controls additions and removals to better
manage its memory footprint.
For a harvest, only the identifier and dateSystemMetadataModified
are needed from the ObjectInfos (elements of the ObjectList), and these
are stored as a map where the keys are the sysmeta modification dates,
and the values are the list of identifiers sharing that date.
Setting the lastHarvestedDate for a MemberNode requires that all
pids sharing the same dateSystemMetadataModified be part of the
same harvest. This class is careful to control removals and additions
to the Map such that only the latest timepoint can be removed, and
once removed, it as well as later timepoints cannot be added at a
later time.
The earliest timepoint in the map cannot be removed, or else the harvest
could end up being empty, even though there are objects to harvest.
(For example, if a timepoint is larger than the maximum harvest size,
it still needs to be harvested. The harvest in this case will exceed
its maximum value, because it must complete the timepoint)
- Author:
- rnahf