Class PersistenceProvider<V>
java.lang.Object
com.scaleoutsoftware.modules.abstractions.PersistenceProvider<V>
- Type Parameters:
V- the type of the SOSS object
PersistenceProvider base class is used to provide external access to a persistent data store.
-
Constructor Summary
ConstructorsConstructorDescriptionPersistenceProvider(String moduleName) Instantiate a PersistenceProvider for a specific module. -
Method Summary
Modifier and TypeMethodDescriptionabstract CompletableFuture<Void> deleteAsync(String id) Asynchronously remove a SOSS object from a persistent data store.Retrieve the module name.abstract voidInitialize the persistence provider.abstract CompletableFuture<V> Asynchronously load a SOSS object from a persistent data store.abstract CompletableFuture<Void> storeAsync(String id, V object) Asynchronously store a SOSS object in a persistent data store.
-
Constructor Details
-
PersistenceProvider
Instantiate a PersistenceProvider for a specific module.- Parameters:
moduleName- the module name.
-
-
Method Details
-
getModuleName
Retrieve the module name.- Returns:
- the module name.
-
initialize
public abstract void initialize()Initialize the persistence provider. -
storeAsync
Asynchronously store a SOSS object in a persistent data store.- Parameters:
id- the unique SOSS object ID.object- the SOSS object.- Returns:
- a
CompletableFuturethat will return null for success. An exception is thrown if an access issue occurred (ex: invalid credentials) when attempting to access the persistent data store.
-
loadAsync
Asynchronously load a SOSS object from a persistent data store.- Parameters:
id- the unique SOSS object ID.- Returns:
- a
CompletableFuturethat will return the object for success. An exception is thrown if an access issue occurred (ex: invalid credentials) when attempting to access the persistent data store.
-
deleteAsync
Asynchronously remove a SOSS object from a persistent data store.- Parameters:
id- the unique SOSS object ID.- Returns:
- a
CompletableFuturethat will return null for success. An exception is thrown if an access issue occurred (ex: invalid credentials) when attempting to access the persistent data store.
-