Package org.opensaml.storage

# Interface EnumeratableStorageService

All Superinterfaces:
  `Component`, `IdentifiedComponent`, `StorageService`

All Known Implementing Classes:
  `AbstractMapBackedStorageService`, `ClientStorageService`, `MemoryStorageService`

public interface EnumeratableStorageService extends StorageService
An extended `StorageService` able to enumerate the keys in a context.

In principle, it is theoretically possible to implement this extension in a stateful manner, thus the use of `Iterable`. In practice, this is exceedingly unlikely to work given the locking requirements and risks of contention this would create.

Since:
  5.0.0

## Method Summary

Modifier and Type
Method
Description
`Iterable<String>`
`getContextKeys(String context, String prefix)`
Return an iterable collection of the keys stored in a context.

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

### Methods inherited from interface org.opensaml.storage.StorageService

`create, create, create, delete, delete, deleteContext, deleteWithVersion, deleteWithVersion, getCapabilities, read, read, read, reap, update, update, update, updateContextExpiration, updateExpiration, updateExpiration, updateWithVersion, updateWithVersion, updateWithVersion`

## Method Details

### getContextKeys

@Nonnull Iterable<String> getContextKeys(@Nonnull @NotEmpty String context, @Nullable String prefix) throws IOException
Return an iterable collection of the keys stored in a context.

Parameters:
  `context` - the context to enumerate
  `prefix` - optional prefix to filter keys
Returns:
  keys stored in a context
Throws:
  `IOException` - on error