Interface ReadEndsForMarkDuplicatesMap

All Known Implementing Classes:
DiskBasedReadEndsForMarkDuplicatesMap, MemoryBasedReadEndsForMarkDuplicatesMap

public interface ReadEndsForMarkDuplicatesMap
Interface for storing and retrieving ReadEnds objects. An implementation may be disk-based to reduce memory footprint.
  • Method Details

    • remove

      ReadEndsForMarkDuplicates remove(int mateSequenceIndex, String key)
      Remove element with given key from the map. Because an implementation may be disk-based, the object returned may not be the same object that was put into the map
      Parameters:
      mateSequenceIndex - must agree with the value used when the object was put into the map
      key - typically, concatenation of read group ID and read name
      Returns:
      null if the key is not found, otherwise the object removed.
    • put

      void put(int mateSequenceIndex, String key, ReadEndsForMarkDuplicates readEnds)
      Store the element in the map with the given key. It is assumed that the element is not already present in the map.
      Parameters:
      mateSequenceIndex - use to optimize storage & retrieval. The same value must be used when trying to remove this element. It is not valid to store the same key with two different mateSequenceIndexes.
      key - typically, concatenation of read group ID and read name
      readEnds - the object to be stored
    • size

      int size()
      Returns:
      number of elements stored in map
    • sizeInRam

      int sizeInRam()
      Returns:
      number of elements stored in RAM. Always <= size()