Interface IracTombstoneManager

  • All Known Implementing Classes:
    DefaultIracTombstoneManager, NoOpIracTombstoneManager

    public interface IracTombstoneManager
    Stores and manages tombstones for removed keys.

    It manages the tombstones for IRAC protocol. Tombstones are used when a key is removed but the version/metadata is required to perform conflict or duplicates detection.

    Tombstones are removed when they are not required by any site or its value is updated (with a non-null value).

    Since:
    14.0
    • Method Detail

      • storeTombstone

        void storeTombstone​(int segment,
                            Object key,
                            IracMetadata metadata)
        Stores a tombstone for a removed key.

        It overwrites any previous tombstone associated to the key.

        Parameters:
        key - The key.
        segment - The key's segment.
        metadata - The IracMetadata.
      • removeTombstone

        void removeTombstone​(Object key)
        Removes the tombstone for key.
        Parameters:
        key - The key.
      • getTombstone

        IracMetadata getTombstone​(Object key)
        Returns the tombstone associated to the key or null if it doesn't exist.
        Parameters:
        key - The key.
        Returns:
        The tombstone.
      • isEmpty

        boolean isEmpty()
        Returns:
        true if no tombstones are stored.
      • size

        int size()
        Returns:
        the number of tombstones stored.
      • isTaskRunning

        boolean isTaskRunning()
        Returns:
        true if the cleanup task is currently running.
      • getCurrentDelayMillis

        long getCurrentDelayMillis()
        Returns:
        The current delay between cleanup task in milliseconds.
      • sendStateTo

        void sendStateTo​(Address requestor,
                         IntSet segments)
        Sends the tombstone belonging to the segments in segment to the originator

        The sending is done asynchronously, and it does not wait for the sending to complete.

        Parameters:
        requestor - The requestor Address.
        segments - The segments requested.