Class ProviderPersistence<T>
java.lang.Object
net.tangly.core.providers.Provider<T>
net.tangly.core.providers.ProviderPersistence<T>
- Type Parameters:
T- type of the instances handled in the provider
Provider where all instances are cached in memory and persisted onto the file system or a database.
The update method uses an eager storage strategy to insure that all instance variables of a Java object are persisted. This approach is necessary due to the implementation restrictions of MicroStream. The current regular store operation does not persist fields based on collections.
-
Constructor Summary
ConstructorsConstructorDescriptionProviderPersistence(@NotNull org.eclipse.store.storage.embedded.types.EmbeddedStorageManager storageManager, @NotNull List<T> items) -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes the data associated with the entity.voidDeletes all the entities managed by the provider.items()Returns a list containing all known instances of the entity type.static <T> ProviderPersistence<T> of(@NotNull org.eclipse.store.storage.embedded.types.EmbeddedStorageManager storageManager, @NotNull List<T> items) voidUpdates the data associated with the entity.voidUpdates the data associated with all entities.
-
Constructor Details
-
ProviderPersistence
-
-
Method Details
-
of
public static <T> ProviderPersistence<T> of(@NotNull @NotNull org.eclipse.store.storage.embedded.types.EmbeddedStorageManager storageManager, @NotNull @NotNull List<T> items) -
items
-
update
Description copied from class:ProviderUpdates the data associated with the entity. If the entity is new, the update is handled as a create operation. The update is transitive and all referenced entities are also updated. The entity given as a parameter becomes the instance managed through the provider. -
updateAll
-
delete
-
deleteAll
-