Class CachedProfileSettingStorage
java.lang.Object
org.exoplatform.social.core.profileproperty.storage.ProfileSettingStorage
io.meeds.social.core.profileproperty.storage.CachedProfileSettingStorage
Caches the settings by id, their ids by name and their ordered id list. A
write invalidates every key it changes: the setting's id, its old and new
parents' ids, its old and new names and the id list. Each key is read through
its cache before the write, so that this node holds it and its eviction is
published to the other nodes of a cluster, then evicted after the write, and
again once the transaction completes, when one is active.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCachedProfileSettingStorage(org.exoplatform.services.cache.CacheService cacheService, ProfilePropertySettingDAO profilePropertySettingDAO, ProfilePropertyOptionDAO profilePropertyOptionDAO) -
Method Summary
Modifier and TypeMethodDescriptionvoidClears this node's three caches and the loads in flight, with no eviction published to the other nodes.booleanSwitches off both listing flags of a stored setting, in the caller's transaction.voidorg.exoplatform.social.core.profileproperty.model.ProfilePropertySettingorg.exoplatform.social.core.profileproperty.model.ProfilePropertySettingList<org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting> org.exoplatform.social.core.profileproperty.model.ProfilePropertySettingsaveProfilePropertySetting(org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting profilePropertySetting, boolean isNew) Methods inherited from class ProfileSettingStorage
getListedSettings, getProfilePropertyOptions, getSynchronizedPropertySettings
-
Field Details
-
PROFILE_SETTINGS_CACHE_NAME
- See Also:
-
PROFILE_SETTING_IDS_BY_NAME_CACHE_NAME
- See Also:
-
PROFILE_SETTING_IDS_CACHE_NAME
- See Also:
-
-
Constructor Details
-
CachedProfileSettingStorage
public CachedProfileSettingStorage(org.exoplatform.services.cache.CacheService cacheService, ProfilePropertySettingDAO profilePropertySettingDAO, ProfilePropertyOptionDAO profilePropertyOptionDAO)
-
-
Method Details
-
getPropertySettings
public List<org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting> getPropertySettings()- Overrides:
getPropertySettingsin classProfileSettingStorage
-
findProfileSettingByName
public org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting findProfileSettingByName(String name) - Overrides:
findProfileSettingByNamein classProfileSettingStorage
-
getProfileSettingById
public org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting getProfileSettingById(Long id) - Overrides:
getProfileSettingByIdin classProfileSettingStorage
-
saveProfilePropertySetting
public org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting saveProfilePropertySetting(org.exoplatform.social.core.profileproperty.model.ProfilePropertySetting profilePropertySetting, boolean isNew) - Overrides:
saveProfilePropertySettingin classProfileSettingStorage
-
deleteProfilePropertySetting
- Overrides:
deleteProfilePropertySettingin classProfileSettingStorage
-
clearListingFlags
Description copied from class:ProfileSettingStorageSwitches off both listing flags of a stored setting, in the caller's transaction.- Overrides:
clearListingFlagsin classProfileSettingStorage- Parameters:
id- the setting's technical identifier- Returns:
- true when a flag was on and the setting was changed
-
clearCaches
public void clearCaches()Clears this node's three caches and the loads in flight, with no eviction published to the other nodes.
-