public final class CachingUserSettingMailStorage extends UserSettingMailStorage
UserSettingMail and falls back to
database-based storage if any cache-related errors occur| Modifier and Type | Method and Description |
|---|---|
void |
clearStorage()
Clears this storage's cache if any used
|
void |
deleteUserSettingMail(int user,
com.openexchange.groupware.contexts.Context ctx,
java.sql.Connection writeConArg)
Deletes the user's mail settings from database
|
void |
handleAbsence()
Handles the (possibly temporary) absence of cache service
|
void |
handleAvailability()
Handles the (re-)availability of cache service
|
UserSettingMail |
loadUserSettingMail(int user,
com.openexchange.groupware.contexts.Context ctx,
java.sql.Connection readConArg)
Loads user's mail settings from database
|
void |
removeUserSettingMail(int user,
com.openexchange.groupware.contexts.Context ctx)
Removes the user's mail settings from cache if any used
|
void |
saveUserSettingMail(UserSettingMail usm,
int user,
com.openexchange.groupware.contexts.Context ctx,
java.sql.Connection writeConArg)
Saves given user's mail settings to database
|
void |
saveUserSettingMailBits(UserSettingMail usm,
int user,
com.openexchange.groupware.contexts.Context ctx,
java.sql.Connection writeConArg)
Saves given user's mail settings bits to database
|
void |
shutdownStorage()
Triggers necessary action to shutdown the storage
|
deleteUserSettingMail, getInstance, getUserSettingMail, getUserSettingMail, getUserSettingMail, getUserSettingMail, loadUserSettingMail, releaseInstance, saveUserSettingMail, saveUserSettingMailBitspublic void saveUserSettingMail(UserSettingMail usm, int user, com.openexchange.groupware.contexts.Context ctx, java.sql.Connection writeConArg) throws com.openexchange.exception.OXException
saveUserSettingMail in class UserSettingMailStorageusm - the user's mail settings to saveuser - the user IDctx - the contextwriteConArg - - the writable connection; may be nullcom.openexchange.exception.OXException - if user's mail settings could not be savedpublic void saveUserSettingMailBits(UserSettingMail usm, int user, com.openexchange.groupware.contexts.Context ctx, java.sql.Connection writeConArg) throws com.openexchange.exception.OXException
UserSettingMailStoragesaveUserSettingMailBits in class UserSettingMailStorageusm - the user's mail settings to saveuser - the user IDctx - the contextwriteConArg - - the writable connection; may be nullcom.openexchange.exception.OXException - if user's mail settings could not be savedpublic void deleteUserSettingMail(int user,
com.openexchange.groupware.contexts.Context ctx,
java.sql.Connection writeConArg)
throws com.openexchange.exception.OXException
deleteUserSettingMail in class UserSettingMailStorageuser - the user IDctx - the contextwriteConArg - the writable connection; may be nullcom.openexchange.exception.OXException - - if deletion failspublic UserSettingMail loadUserSettingMail(int user, com.openexchange.groupware.contexts.Context ctx, java.sql.Connection readConArg) throws com.openexchange.exception.OXException
loadUserSettingMail in class UserSettingMailStorageuser - the userctx - the contextreadConArg - the readable connection; may be null to fetch own connection.UserSettingMail which matches given user ID and contextcom.openexchange.exception.OXException - if loading failspublic void clearStorage()
throws com.openexchange.exception.OXException
UserSettingMailStorageclearStorage in class UserSettingMailStoragecom.openexchange.exception.OXException - if cache clearing failspublic void removeUserSettingMail(int user,
com.openexchange.groupware.contexts.Context ctx)
throws com.openexchange.exception.OXException
UserSettingMailStorageremoveUserSettingMail in class UserSettingMailStorageuser - the userctx - the contextcom.openexchange.exception.OXException - if cache removal failspublic void shutdownStorage()
UserSettingMailStorageshutdownStorage in class UserSettingMailStoragepublic void handleAbsence()
throws com.openexchange.exception.OXException
com.openexchange.cache.registry.CacheAvailabilityListenercom.openexchange.exception.OXException - If an error occurspublic void handleAvailability()
throws com.openexchange.exception.OXException
com.openexchange.cache.registry.CacheAvailabilityListenercom.openexchange.exception.OXException - If an error occurs