public class PreferencesEntityStoreMixin extends Object implements ServiceActivation, EntityStore, EntityStoreSPI
@see Preferences
Associations are stored as the reference of the referenced Entity, ManyAssociations are stored as multi-line strings (one reference per line), and NamedAssociations are stored as multi-line strings (one name on a line, reference on the next line).
Nested ValuesComposites, Collections and Maps are stored using available StateSerialization service.
ServiceActivation.ServiceActivator| Modifier and Type | Field and Description |
|---|---|
ScheduledThreadPoolExecutor |
reloadExecutor |
| Constructor and Description |
|---|
PreferencesEntityStoreMixin() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateService()
Called after ServiceComposite Activation.
|
StateCommitter |
applyChanges(EntityStoreUnitOfWork unitofwork,
Iterable<EntityState> state) |
EntityState |
entityStateOf(EntityStoreUnitOfWork unitOfWork,
ModuleDescriptor module,
EntityReference reference) |
Stream<EntityState> |
entityStates(ModuleDescriptor module)
Stream of all entity states, must be closed.
|
EntityState |
newEntityState(EntityStoreUnitOfWork unitOfWork,
EntityReference reference,
EntityDescriptor entityDescriptor) |
EntityStoreUnitOfWork |
newUnitOfWork(ModuleDescriptor module,
Usecase usecase,
Instant currentTime) |
protected Identity |
newUnitOfWorkId() |
void |
passivateService()
Called before ServiceComposite Passivation.
|
String |
versionOf(EntityStoreUnitOfWork unitOfWork,
EntityReference reference) |
protected void |
writeEntityState(DefaultEntityState state,
Preferences entityPrefs,
Identity identity,
Instant lastModified) |
public ScheduledThreadPoolExecutor reloadExecutor
public void activateService()
throws Exception
ServiceActivationactivateService in interface ServiceActivationException - if unable to activatepublic void passivateService()
throws Exception
ServiceActivationpassivateService in interface ServiceActivationException - if unable to passivatepublic EntityStoreUnitOfWork newUnitOfWork(ModuleDescriptor module, Usecase usecase, Instant currentTime)
newUnitOfWork in interface EntityStorepublic Stream<EntityState> entityStates(ModuleDescriptor module)
EntityStoreentityStates in interface EntityStoremodule - Modulepublic EntityState newEntityState(EntityStoreUnitOfWork unitOfWork, EntityReference reference, EntityDescriptor entityDescriptor)
newEntityState in interface EntityStoreSPIpublic EntityState entityStateOf(EntityStoreUnitOfWork unitOfWork, ModuleDescriptor module, EntityReference reference)
entityStateOf in interface EntityStoreSPIpublic String versionOf(EntityStoreUnitOfWork unitOfWork, EntityReference reference)
versionOf in interface EntityStoreSPIpublic StateCommitter applyChanges(EntityStoreUnitOfWork unitofwork, Iterable<EntityState> state)
applyChanges in interface EntityStoreSPIprotected void writeEntityState(DefaultEntityState state, Preferences entityPrefs, Identity identity, Instant lastModified) throws EntityStoreException
EntityStoreExceptionprotected Identity newUnitOfWorkId()