Package org.opensaml.storage

# Class MutableStorageRecord<T>

java.lang.Object
org.opensaml.storage.StorageRecord<T>
org.opensaml.storage.MutableStorageRecord<T>

Type Parameters:
  `T` - type of record

public class MutableStorageRecord<T> extends StorageRecord<T>
Exposes mutation of `StorageRecord` properties.

## Constructor Summary

Constructors
Constructor
Description
`MutableStorageRecord(String val, Long exp)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`long`
`incrementVersion()`
Increment the record version and returns the new value.
`void`
`setExpiration(Long exp)`
Set the record expiration.
`void`
`setValue(String val)`
Set the record value.

### Methods inherited from class org.opensaml.storage.StorageRecord

`getExpiration, getValue, getValue, getVersion, isExpired, isValid, setValue, setVersion`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MutableStorageRecord

public MutableStorageRecord(@Nonnull @NotEmpty String val, @Nullable Long exp)
Constructor.

Parameters:
  `val` - value
  `exp` - expiration, or null if none

## Method Details

### setValue

public void setValue(@Nonnull @NotEmpty String val)
Set the record value.

Overrides:
  `setValue` in class `StorageRecord<T>`
Parameters:
  `val` - the new record value

### 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