Package org.opensaml.storage.impl.client
Interface ClientStorageServiceStore
- All Known Implementing Classes:
AbstractClientStorageServiceStore
,JSONClientStorageServiceStore
,XMLClientStorageServiceStore
public interface ClientStorageServiceStore
Abstraction for the storage and reconstitution of data for a
ClientStorageService
.- Since:
- 4.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A factory for producing newClientStorageServiceStore
instances. -
Method Summary
Modifier and TypeMethodDescriptionGet the map of contexts to manipulate during operations.Get the data source.boolean
isDirty()
Get the dirty bit for the current data.void
Reconstitute stored data.save
(ClientStorageService storageService) Serialize current state of stored data into a storage operation.void
setDirty
(boolean flag) Set the dirty bit for the current data.
-
Method Details
-
getSource
Get the data source.- Returns:
- data source
-
isDirty
boolean isDirty()Get the dirty bit for the current data.- Returns:
- status of dirty bit
-
setDirty
void setDirty(boolean flag) Set the dirty bit for the current data.- Parameters:
flag
- dirty bit to set
-
getContextMap
Get the map of contexts to manipulate during operations.- Returns:
- map of contexts to manipulate
-
load
Reconstitute stored data.The dirty bit is set based on the result. If successful, the bit is cleared, but if an error occurs, it will be set.
By design this method should not throw under any non-catastrophic conditions.
- Parameters:
raw
- serialized data to loadsrc
- storage source
-
save
@Nullable ClientStorageServiceOperation save(@Nonnull ClientStorageService storageService) throws IOException Serialize current state of stored data into a storage operation.- Parameters:
storageService
- storage service- Returns:
- the operation, or a null if the data has not been modified since loading or saving
- Throws:
IOException
- if an error occurs
-