Package org.opensaml.core.xml.persist

# Interface ConditionalLoadXMLObjectLoadSaveManager<T extends XMLObject>

Type Parameters:
  `T` - the base type of XML objects being managed

All Superinterfaces:
  `XMLObjectLoadSaveManager<T>`

All Known Implementing Classes:
  `AbstractConditionalLoadXMLObjectLoadSaveManager`, `FilesystemLoadSaveManager`, `MapLoadSaveManager`

public interface ConditionalLoadXMLObjectLoadSaveManager<T extends XMLObject> extends XMLObjectLoadSaveManager<T>
Interface for specialization of `XMLObjectLoadSaveManager` implementations which track the modify times of requested data such that `XMLObjectLoadSaveManager.load(String)` returns data only if the data associated with the key has been modified since the last request.

## Method Summary

Modifier and Type
Method
Description
`void`
`clearAllLoadLastModified()`
Clear the cached modified times for the last load for all keys.
`Instant`
`clearLoadLastModified(String key)`
Clear the cached modified time for the last load of the specified key.
`Instant`
`getLoadLastModified(String key)`
Retrieve the cached modified time for the last load of the specified key.
`boolean`
`isLoadConditionally()`
Get whether `XMLObjectLoadSaveManager.load(String)` will check and return data only if modified since the last request for that data.

### Methods inherited from interface org.opensaml.core.xml.persist.XMLObjectLoadSaveManager

`exists, listAll, listKeys, load, remove, save, save, updateKey`

## Method Details

### isLoadConditionally

boolean isLoadConditionally()
Get whether `XMLObjectLoadSaveManager.load(String)` will check and return data only if modified since the last request for that data.

Returns:
  true if data modify time check is enabled, false if not

### getLoadLastModified

@Nullable Instant getLoadLastModified(@Nonnull String key)
Retrieve the cached modified time for the last load of the specified key.

Note that this will be null if `XMLObjectLoadSaveManager.load(String)` has not been called for the specified key since construction or since the last call to `clearLoadLastModified(String)` or `clearAllLoadLastModified()`.

Parameters:
  `key` - the target key
Returns:
  the current cached modified time, may be null

### clearLoadLastModified

@Nullable Instant clearLoadLastModified(@Nonnull String key)
Clear the cached modified time for the last load of the specified key.

Parameters:
  `key` - the target key
Returns:
  the previously cached modified time, or null if did not exist

### clearAllLoadLastModified

void clearAllLoadLastModified()
Clear the cached modified times for the last load for all keys.