|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.settings.cache.CacheSettingServiceImpl
public class CacheSettingServiceImpl
Created by The eXo Platform SAS Author : eXoPlatform bangnv@exoplatform.com Nov 15, 2012 CacheSettingServiceImpl is implemented for application which uses cache. CacheSettingServiceImpl contains also settingService for database. In case of saving and removing setting properties, CacheSettingService will effect the change in cache and database. Otherwise, it will search setting properties in cache at first and then in database, that allows to improve performance.
| Field Summary | |
|---|---|
protected org.exoplatform.services.cache.future.FutureExoCache<org.exoplatform.commons.api.settings.data.SettingKey,org.exoplatform.commons.api.settings.SettingValue,SettingServiceImpl> |
futureExoCache
|
protected org.exoplatform.services.cache.ExoCache<org.exoplatform.commons.api.settings.data.SettingKey,org.exoplatform.commons.api.settings.SettingValue> |
settingCache
|
| Constructor Summary | |
|---|---|
CacheSettingServiceImpl(SettingServiceImpl service,
org.exoplatform.services.cache.CacheService cacheService)
Create cache setting service object with service for database and service for cache |
|
| Method Summary | |
|---|---|
org.exoplatform.commons.api.settings.SettingValue<?> |
get(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope,
String key)
Get setting value associated with composite key(context, scope, key) This service will search in the cache first and then in the database. |
void |
remove(org.exoplatform.commons.api.settings.data.Context context)
remove all the value associated with the specified context in cache and database also. |
void |
remove(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope)
remove all the value associated with the specified context and specified scope in cache and database also. |
void |
remove(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope,
String key)
Remove all the value associated with the composite key(context,scope,key) in cache and also in database. |
void |
set(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope,
String key,
org.exoplatform.commons.api.settings.SettingValue<?> value)
Set the specified value with the key which is composed by context, scope, key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.exoplatform.services.cache.ExoCache<org.exoplatform.commons.api.settings.data.SettingKey,org.exoplatform.commons.api.settings.SettingValue> settingCache
protected org.exoplatform.services.cache.future.FutureExoCache<org.exoplatform.commons.api.settings.data.SettingKey,org.exoplatform.commons.api.settings.SettingValue,SettingServiceImpl> futureExoCache
| Constructor Detail |
|---|
public CacheSettingServiceImpl(SettingServiceImpl service,
org.exoplatform.services.cache.CacheService cacheService)
service - Setting service for databasecacheService - Cache service| Method Detail |
|---|
public void set(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope,
String key,
org.exoplatform.commons.api.settings.SettingValue<?> value)
set in interface org.exoplatform.commons.api.settings.SettingServicecontext - context with which the specified value is to be associatedscope - scope with which the specified value is to be associatedkey - key with which the specified value is to be associatedvalue - value to be associated with the specified key.
public org.exoplatform.commons.api.settings.SettingValue<?> get(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope,
String key)
get in interface org.exoplatform.commons.api.settings.SettingService
public void remove(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope,
String key)
remove in interface org.exoplatform.commons.api.settings.SettingServicecontext - context with which the specified value is to be associated. The context type must be USER and context.id must be not null.scope - scope with which the specified value is to be associated. The scope.id must be not null.key - key with which the specified value is to be associated
public void remove(org.exoplatform.commons.api.settings.data.Context context,
org.exoplatform.commons.api.settings.data.Scope scope)
remove in interface org.exoplatform.commons.api.settings.SettingServicecontext - context with which the specified value is to be associated. The context type must be USER and context.id must be not null.scope - scope with which the specified value is to be associated. The scope.id must be not null.public void remove(org.exoplatform.commons.api.settings.data.Context context)
remove in interface org.exoplatform.commons.api.settings.SettingServicecontext - context with which the specified value is to be associated. The context type must be USER and context.id must be not null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||