Class RepeatableReadEntry

    • Field Detail

      • oldValue

        protected java.lang.Object oldValue
      • oldMetadata

        protected Metadata oldMetadata
    • Constructor Detail

      • RepeatableReadEntry

        public RepeatableReadEntry​(java.lang.Object key,
                                   java.lang.Object value,
                                   Metadata metadata)
    • Method Detail

      • setValue

        public final java.lang.Object setValue​(java.lang.Object value)
        Description copied from interface: CacheEntry
        Sets the value of the entry, returning the previous value
        Specified by:
        setValue in interface CacheEntry
        Specified by:
        setValue in interface java.util.Map.Entry
        Overrides:
        setValue in class ReadCommittedEntry
        Parameters:
        value - value to set
        Returns:
        previous value
      • resetCurrentValue

        public void resetCurrentValue()
        Description copied from interface: MVCCEntry
        Reset the current value of the entry to the value before the commmand was executed the first time. This is invoked before the command is retried.
        Specified by:
        resetCurrentValue in interface MVCCEntry
        Overrides:
        resetCurrentValue in class ReadCommittedEntry
      • updatePreviousValue

        public void updatePreviousValue()
        Description copied from interface: MVCCEntry
        Update the previous value of the entry - set it to current value. This is invoked when the command is successfuly finished (there won't be any more retries) or when the value was updated from external source.
        Specified by:
        updatePreviousValue in interface MVCCEntry
        Overrides:
        updatePreviousValue in class ReadCommittedEntry
      • getOldValue

        public java.lang.Object getOldValue()
      • getOldMetadata

        public Metadata getOldMetadata()
      • setRead

        public void setRead()
        Description copied from interface: MVCCEntry
        Mark that this entry was loaded from the cache (as opposed to generated by the application using write-only command), mostly for purposes of the write skew check.
      • isRead

        public boolean isRead()
        Description copied from interface: MVCCEntry
        Check is this entry as loaded from the cache (as opposed to generated by the application using write-only command), mostly for purposes of the write skew check.