Package org.opensaml.storage.impl.client
Interface ClientStorageServiceStore
-
- All Known Implementing Classes:
AbstractClientStorageServiceStore,JSONClientStorageServiceStore,XMLClientStorageServiceStore
public interface ClientStorageServiceStoreAbstraction for the storage and reconstitution of data for aClientStorageService.- Since:
- 4.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceClientStorageServiceStore.FactoryA factory for producing newClientStorageServiceStoreinstances.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Map<String,MutableStorageRecord<?>>>getContextMap()Get the map of contexts to manipulate during operations.ClientStorageService.ClientStorageSourcegetSource()Get the data source.booleanisDirty()Get the dirty bit for the current data.voidload(String raw, ClientStorageService.ClientStorageSource src)Reconstitute stored data.ClientStorageServiceOperationsave(ClientStorageService storageService)Serialize current state of stored data into a storage operation.voidsetDirty(boolean flag)Set the dirty bit for the current data.
-
-
-
Method Detail
-
getSource
@Nonnull ClientStorageService.ClientStorageSource 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
@Nonnull @NonnullElements @Live Map<String,Map<String,MutableStorageRecord<?>>> getContextMap()
Get the map of contexts to manipulate during operations.- Returns:
- map of contexts to manipulate
-
load
void load(@Nullable @NotEmpty String raw, @Nonnull ClientStorageService.ClientStorageSource src)
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
-
-