|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.persist.AbstractStorage
com.sibvisions.rad.persist.AbstractCachedStorage
public abstract class AbstractCachedStorage
The AbstractCachedStorage
implements the caching mechanism of ICachedStorage
. It
is the abstract base class for storages with standard meta data caching.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sibvisions.rad.persist.AbstractStorage |
---|
AbstractStorage.AllFetchedList<E> |
Constructor Summary | |
---|---|
AbstractCachedStorage()
Creates a new instance of AbstractCachedStorage . |
Method Summary | |
---|---|
static void |
clearMetaData()
Clears the meta data cache. |
static void |
clearMetaData(java.lang.String pApplicationName)
Clears the meta data cache for the given application. |
static java.util.Hashtable<java.lang.String,MetaData> |
getMetaData(java.lang.String pGroup)
Gets meta data which are cached under a specific name. |
MetaData |
getMetaData(java.lang.String pGroup,
java.lang.String pName)
Returns the meta data for this AbstractStorage from the storage as MetaData and places
the MetaData to the cache with a group name and meta data name. |
static java.util.List<java.lang.String> |
getMetaDataCacheGroups(java.lang.String pApplicationName)
Gets the available metadata cache groups for the given application. |
MetaDataCacheOption |
getMetaDataCacheOption()
Gets the metadata cache option for this instance. |
java.util.Hashtable<java.lang.String,MetaData> |
getMetaDataFromCache(java.lang.String pGroup)
Returns all available meta data from the cache for a specific cache group. |
protected MetaData |
getMetaDataFromCache(java.lang.String pGroup,
java.lang.String pName)
Gets meta data from the cache. |
static boolean |
isGlobalMetaDataCacheEnabled()
Gets whether the global meta data cache is enabled. |
protected boolean |
isMetaDataCacheEnabled()
Gets whether the meta data cache should be used. |
protected void |
putMetaDataToCache(java.lang.String pGroup,
java.lang.String pName,
MetaData pMetaData)
Puts meta data to the cache. |
static boolean |
removeMetaData(java.lang.String pGroup)
Removes all metadata for the given group. |
static void |
setGlobalMetaDataCacheEnabled(boolean pEnabled)
Sets the global meta data cache en-/disabled. |
void |
setMetaDataCacheOption(MetaDataCacheOption pOption)
Sets the metadata cache option for this instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.rad.persist.IStorage |
---|
delete, fetch, getEstimatedRowCount, getMetaData, insert, refetchRow, update |
Methods inherited from interface com.sibvisions.util.ICloseable |
---|
close |
Constructor Detail |
---|
public AbstractCachedStorage()
AbstractCachedStorage
. This constructor checks if the global metadata
cache option is en- or disabled.
Method Detail |
---|
public MetaData getMetaData(java.lang.String pGroup, java.lang.String pName) throws DataSourceException
MetaData
and places
the MetaData to the cache with a group name and meta data name.
getMetaData
in interface ICachedStorage
pGroup
- the cache group namepName
- the name for the meta data in the cache group
MetaData
.
DataSourceException
- if an Exception
occur during getting the meta data from the storagepublic java.util.Hashtable<java.lang.String,MetaData> getMetaDataFromCache(java.lang.String pGroup)
getMetaDataFromCache
in interface ICachedStorage
pGroup
- the cache group name
Hashtable
with the name of the meta data in the cache group and the meta data as valueprotected void putMetaDataToCache(java.lang.String pGroup, java.lang.String pName, MetaData pMetaData)
pGroup
- the group name e.g. the life-cycle namepName
- the name in the grouppMetaData
- the meta data to cacheprotected MetaData getMetaDataFromCache(java.lang.String pGroup, java.lang.String pName)
pGroup
- the group name e.g. the life-cycle namepName
- the name in the group
null
if meta data are not cachedpublic static java.util.Hashtable<java.lang.String,MetaData> getMetaData(java.lang.String pGroup)
pGroup
- the cache name
null
if there are no meta data with the namepublic static java.util.List<java.lang.String> getMetaDataCacheGroups(java.lang.String pApplicationName)
pApplicationName
- the application name
public static boolean removeMetaData(java.lang.String pGroup)
pGroup
- the group name
true
if metadata were removed, false
otherwisepublic static void clearMetaData()
public static void clearMetaData(java.lang.String pApplicationName)
pApplicationName
- the application namepublic static void setGlobalMetaDataCacheEnabled(boolean pEnabled)
pEnabled
- true
to enable meta data cache, false
otherwisepublic static boolean isGlobalMetaDataCacheEnabled()
true
if meta data cache is enabled, false
otherwisepublic void setMetaDataCacheOption(MetaDataCacheOption pOption)
pOption
- the metadata cache optionisMetaDataCacheEnabled()
public MetaDataCacheOption getMetaDataCacheOption()
setMetaDataCacheOption(MetaDataCacheOption)
protected boolean isMetaDataCacheEnabled()
true
when the metadata cache should be used. This means that
either the instance cache option is MetaDataCacheOption.On
, the session cache option is MetaDataCacheOption.On
or the cache options are set to MetaDataCacheOption.Default
and the global meta data cache is
enabled.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |