Interface Command

    • Method Detail

      • isPut

        boolean isPut​(java.lang.Object key)
        Is this command represents adding a key to the store
        Parameters:
        key - the key
        Returns:
        true, if this command would try to add an Element for key, otherwise false
      • isRemove

        boolean isRemove​(java.lang.Object key)
        Is this command represents removing a key to the store
        Parameters:
        key - the key
        Returns:
        true, if this command would try to remove an Element for key, otherwise false
      • prepare

        boolean prepare​(Store store,
                        SoftLockManager softLockManager,
                        XidTransactionID transactionId,
                        ElementValueComparator comparator)
        Prepare the commmand un the underlying store
        Parameters:
        store - the underdyling store
        softLockManager - the soft lock manager
        transactionId - the transaction ID
        comparator - the element value comparator
        Returns:
        true if prepare updated the store, false otherwise
      • rollback

        void rollback​(Store store,
                      SoftLockManager softLockManager)
        Rollback the prepared change
        Parameters:
        store - the underlying store
        softLockManager - the soft lock manager
      • getObjectKey

        java.lang.Object getObjectKey()
        Get the key of the element this command is working on
        Returns:
        the element's key