Interface IracManager

  • All Known Implementing Classes:
    DefaultIracManager, NoOpIracManager

    public interface IracManager
    It manages the keys changed in the local cluster and sends to all asynchronous backup configured.

    The lockOwner is the last command (or transaction) who updated the key. It is used to detect conflicting local updates while sending to the remote backups (sites).

    Since:
    11.0
    Author:
    Pedro Ruivo
    • Method Detail

      • trackUpdatedKey

        void trackUpdatedKey​(Object key,
                             Object lockOwner)
        Sets the key as changed by the lockOwner.
        Parameters:
        key - The key changed.
        lockOwner - The lock owner who updated the key.
      • trackUpdatedKeys

        <K> void trackUpdatedKeys​(Collection<K> keys,
                                  Object lockOwner)
        Sets all the keys in keys as changed by the lockOwner.
        Parameters:
        keys - A Collection of keys changed.
        lockOwner - The lock owner who updated the keys.
      • trackKeysFromTransaction

        void trackKeysFromTransaction​(Stream<WriteCommand> modifications,
                                      GlobalTransaction lockOwner)
        Sets all keys affected by the transaction as changed.
        Parameters:
        modifications - The Stream of modifications made by the transaction.
        lockOwner - The GlobalTransaction.
      • trackClear

        void trackClear()
        Sets all keys as removed.
      • cleanupKey

        void cleanupKey​(Object key,
                        Object lockOwner,
                        IracMetadata tombstone)
        Sets the key as not changed and remove any tombstone related to it.

        If lockOwner isn't the last one who updated the key, this method is a no-op.

        Parameters:
        key - The key.
        lockOwner - The lock owner who updated the key.
        tombstone - The tombstone (can be null).
      • requestState

        void requestState​(Address origin,
                          org.infinispan.commons.util.IntSet segments)
        Requests the state stored in this instance for the given segments.
        Parameters:
        origin - The requestor.
        segments - The segments requested.
      • receiveState

        void receiveState​(Object key,
                          Object lockOwner,
                          IracMetadata tombstone)
        Receives the state related to the key.
        Parameters:
        key - The key modified.
        lockOwner - The last lockOwner.
        tombstone - The tombstone (can be null)