Enum NoOpIracManager

    • Method Detail

      • values

        public static NoOpIracManager[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NoOpIracManager c : NoOpIracManager.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NoOpIracManager valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • trackUpdatedKey

        public void trackUpdatedKey​(int segment,
                                    Object key,
                                    Object lockOwner)
        Description copied from interface: IracManager
        Sets the key as changed by the lockOwner.
        Specified by:
        trackUpdatedKey in interface IracManager
        Parameters:
        segment - The key's segment.
        key - The key changed.
        lockOwner - The lock owner who updated the key.
      • trackExpiredKey

        public void trackExpiredKey​(int segment,
                                    Object key,
                                    Object lockOwner)
        Description copied from interface: IracManager
        Similar to IracManager.trackUpdatedKey(int, Object, Object) but it tracks expired keys instead.

        Expired key need a different conflict resolution algorithm since remove expired should never win any conflict.

        Specified by:
        trackExpiredKey in interface IracManager
        Parameters:
        segment - The key's segment.
        key - The key expired.
        lockOwner - The lock owner who updated the key.
      • trackClear

        public void trackClear​(boolean sendClear)
        Description copied from interface: IracManager
        Sets all keys as removed.
        Specified by:
        trackClear in interface IracManager
        Parameters:
        sendClear - if true, an IracClearKeysCommand is sent to the backup sites.
      • removeState

        public void removeState​(IracManagerKeyInfo state)
        Description copied from interface: IracManager
        Removes the state associated to a single key.
        Specified by:
        removeState in interface IracManager
        Parameters:
        state - The state to remove.
      • requestState

        public void requestState​(Address requestor,
                                 IntSet segments)
        Description copied from interface: IracManager
        Requests the state stored in this instance for the given segments.
        Specified by:
        requestState in interface IracManager
        Parameters:
        requestor - The requestor.
        segments - The segments requested.
      • receiveState

        public void receiveState​(int segment,
                                 Object key,
                                 Object lockOwner,
                                 IracMetadata tombstone)
        Description copied from interface: IracManager
        Receives the state related to the key.
        Specified by:
        receiveState in interface IracManager
        Parameters:
        segment - The key's segment.
        key - The key modified.
        lockOwner - The last lockOwner.
        tombstone - The tombstone (can be null)
      • checkAndTrackExpiration

        public CompletionStage<Boolean> checkAndTrackExpiration​(Object key)
        Description copied from interface: IracManager
        Checks if the given key is expired on all other sites. If the key is expired on all other sites this will return true
        Specified by:
        checkAndTrackExpiration in interface IracManager
        Parameters:
        key - The key to check if it is expired or not
        Returns:
        Whether this key is expired on all other sites
      • incrementNumberOfConflictLocalWins

        public void incrementNumberOfConflictLocalWins()
        Description copied from interface: IracManager
        Increase the count of conflicts if merge policy discard update (local value wins)
        Specified by:
        incrementNumberOfConflictLocalWins in interface IracManager
      • incrementNumberOfConflictRemoteWins

        public void incrementNumberOfConflictRemoteWins()
        Description copied from interface: IracManager
        Increase the count of conflicts if merge policy applies update (remote value wins)
        Specified by:
        incrementNumberOfConflictRemoteWins in interface IracManager
      • incrementNumberOfConflictMerged

        public void incrementNumberOfConflictMerged()
        Description copied from interface: IracManager
        Increase the count of conflicts if merge policy created a new value (merge remote value with local value)
        Specified by:
        incrementNumberOfConflictMerged in interface IracManager
      • containsKey

        public boolean containsKey​(Object key)
        Description copied from interface: IracManager
        Checks if the key is present.

        A key is present as long as its latest update was not confirmed by all remote sites.

        Specified by:
        containsKey in interface IracManager
        Parameters:
        key - The key to check.
        Returns:
        true if the key is present.