Class MutableStorageRecord<T>

  • Type Parameters:
    T - type of record

    public class MutableStorageRecord<T>
    extends StorageRecord<T>
    Exposes mutation of StorageRecord properties.
    • Constructor Detail

      • MutableStorageRecord

        public MutableStorageRecord​(@Nonnull @NotEmpty
                                    String val,
                                    @Nullable
                                    Long exp)
        Constructor.
        Parameters:
        val - value
        exp - expiration, or null if none
    • Method Detail

      • setExpiration

        public void setExpiration​(@Nullable
                                  Long exp)
        Set the record expiration.
        Overrides:
        setExpiration in class StorageRecord<T>
        Parameters:
        exp - the new record expiration, or null if none
      • incrementVersion

        public long incrementVersion()
        Increment the record version and returns the new value.
        Overrides:
        incrementVersion in class StorageRecord<T>
        Returns:
        the updated version