public class PreferencesEntityStoreMixin extends Object implements ServiceActivation, EntityStore, EntityStoreSPI
@see Preferences
Associations are stored as the identity of the referenced Entity, ManyAssociations are stored as multi-line strings (one identity per line), and NamedAssociations are stored as multi-line strings (one name on a line, identity on the next line).
Nested ValuesComposites, Collections and Maps are stored using available ValueSerialization service.
ServiceActivation.ServiceActivator
Modifier and Type | Field and Description |
---|---|
org.slf4j.Logger |
logger |
ScheduledThreadPoolExecutor |
reloadExecutor |
protected String |
uuid |
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,
ModuleSpi module,
EntityReference identity) |
Input<EntityState,EntityStoreException> |
entityStates(ModuleSpi module) |
EntityState |
newEntityState(EntityStoreUnitOfWork unitOfWork,
ModuleSpi module,
EntityReference identity,
EntityDescriptor entityDescriptor) |
EntityStoreUnitOfWork |
newUnitOfWork(Usecase usecase,
ModuleSpi module,
long currentTime) |
protected String |
newUnitOfWorkId() |
void |
passivateService()
Called before ServiceComposite Passivation.
|
protected void |
writeEntityState(DefaultEntityState state,
Preferences entityPrefs,
String identity,
long lastModified) |
protected String uuid
public org.slf4j.Logger logger
public ScheduledThreadPoolExecutor reloadExecutor
public void activateService() throws Exception
ServiceActivation
activateService
in interface ServiceActivation
Exception
public void passivateService() throws Exception
ServiceActivation
passivateService
in interface ServiceActivation
Exception
public EntityStoreUnitOfWork newUnitOfWork(Usecase usecase, ModuleSpi module, long currentTime)
newUnitOfWork
in interface EntityStore
public Input<EntityState,EntityStoreException> entityStates(ModuleSpi module)
entityStates
in interface EntityStore
public EntityState newEntityState(EntityStoreUnitOfWork unitOfWork, ModuleSpi module, EntityReference identity, EntityDescriptor entityDescriptor)
newEntityState
in interface EntityStoreSPI
public EntityState entityStateOf(EntityStoreUnitOfWork unitOfWork, ModuleSpi module, EntityReference identity)
entityStateOf
in interface EntityStoreSPI
public StateCommitter applyChanges(EntityStoreUnitOfWork unitofwork, Iterable<EntityState> state)
applyChanges
in interface EntityStoreSPI
protected void writeEntityState(DefaultEntityState state, Preferences entityPrefs, String identity, long lastModified) throws EntityStoreException
EntityStoreException
protected String newUnitOfWorkId()