jet.server.api.admin.cfg
Interface ConfigurationCache


public interface ConfigurationCache

This interface defines the methods to manage the cache configuration of server.


Method Summary
 void appendImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          Appends an image to cache.
 long getAnImageSize(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          Gets an image size in memory.
 java.util.Vector getCachedCatalogs()
          Returns the file name of the catalog needed to be cached.
 java.util.Vector getCachedImages()
          Returns the file name of the image needed to be cached.
 java.util.Vector getCachedReports()
          Returns the file names of the report needed to be cached.
 java.util.Vector getCachedReportsWithStyles()
          Returns the file names and styles of the report needed to be cached.
 int getCRDMemoryUsage()
          Gets the CRD memory usage.
 boolean getDisplayImageDetail()
          Returns whether to display the cached images detail.
 boolean getEnableCacheCatelog()
          Returns whether to cache the catalog.
 boolean getEnableCacheImage()
          Returns whether to cache the image.
 boolean getEnableCacheReport()
          Returns whether to cache report.
 int getEngineSortBufferSize()
          Gets the size of engine sort buffer from the configuration properties.
 long getExpiredTime()
          Gets the expired time of the automatic cache data.
 java.lang.String getImageBelongedCatalog(java.lang.String fullImagePath)
          Gets the catalog which the special image belongs to.
 int getMaxCacheCatalogSize()
          Returns the max number of the catalogs to be cached.
 int getMaxCacheImageSize()
          Returns the max number of the images to be cached.
 int getMaxCacheReportSize()
          Returns max number of the reports to be cached.
 double getMaxCubeMemory()
          Returns Maximum Cube Memory Allowed, unit is MB.
 int getMaxDiskUsage()
          Gets the maximum hard disk space which is used to automatically cache data.
 int getSecurityCacheExpireTime()
          Gets the expire time of the security cache object.
 int getSecurityGroupCacheSize()
          Gets the security group cache size.
 int getSecurityProectionCacheSize()
          Gets the security protection cache size.
 int getSecurityRoleCacheSize()
          Gets the security role cache size.
 int getSecurityUserCacheSize()
          Gets the security user cache size.
 long getUsedImageCacheSize()
          Gets the used image cache size.
 boolean isAutoCache()
          Checks whether the automatic cache is enabled.
 boolean isCacheAllImages()
          Checks whether to cache all the images.
 boolean isLockedImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          Checks if the image is locked.
 boolean isNeverExpire()
          Checks whether the automatic cache data is never expired.
 void loadProperties()
          Loads the properties of server.
 boolean lockCachedImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          Locks a cached image.
 void removeAllImages()
          Removes all the images.
 void removeImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          Removes an image.
 void saveProperties()
          Saves the modified settings to the configuration file (server.properties).
 void setCacheAllImages(boolean isCacheAllImages)
          Sets whether to cache all the images.
 boolean setCachedCatalogs(java.lang.String user, java.util.Vector cachedCatalogs)
          Sets the file name of the catalog needed to be cached.
 boolean setCachedCatalogs(java.util.Vector<java.lang.String> cachedCatalogs)
          Sets the file names of the catalog needed to be cached.
 boolean setCachedReports(java.util.Vector cachedReports)
          Sets the file name of the report needed to be cached.
 boolean setCachedReportsWithStyles(java.lang.String user, java.util.Vector cachedReportsWithStyles)
          Sets the file names and styles of the report needed to be cached.If set successfully, return true;
 boolean setCachedReportsWithStyles(java.util.Vector cachedReportsWithStyles)
          Sets the file names and styles of the report needed to cached.
 void setCRDMemoryUsage(int maxMemoryUsage)
          Sets the CRD memory usage.
 void setDisplayImageDetail(boolean isDisplay)
          Sets whether to display the cached images detail.
 void setEnableAutoCache(boolean isEnableAutoCache)
          Enables/disables the automatic cache.
 void setEnableCacheCatelog(boolean isEnableCacheCatelog)
          Sets whether to cache the catalog.
 void setEnableCacheImage(boolean isEnableCacheImage)
          Sets whether to cache the image.
 void setEnableCacheReport(boolean isEnableCacheReport)
          Sets whether to cache report.
 void setEngineSortBufferSize(int size)
          Sets the size of the engine sort buffer.
 void setExpiredTime(long expiredTime)
          Sets the expired time of the automatic cache data.
 void setMaxCacheCatalogSize(int maxCacheCatalog)
          Sets the max number of the catalogs to be cached.
 void setMaxCacheImageSize(int maxCacheImage)
          Sets the max number of the images to be cached.
 void setMaxCacheReportSize(int maxCacheReport)
          Sets max number of the reports to be cached.
 void setMaxCubeMemory(double memorySize)
          Sets Maximum Cube Memory Allowed, unit is MB.
 void setMaxDiskUsage(int maxDiskUsage)
          Sets the maximum hard disk space which is used to automatically cache data.
 void setNeverExpire(boolean isNeverExpire)
          Sets whether the automatic cache data is never expired.
 void setSecurityCacheExpireTime(int expireTime)
          Set the expire time of the security cache object.
 void setSecurityGroupCacheSize(int size)
          Sets the security group cache size.
 void setSecurityProtectionCacheSize(int size)
          Sets the security protection cache size.
 void setSecurityRoleCacheSize(int size)
          Sets the security role cache size.
 void setSecurityUserCacheSize(int size)
          Sets the security user cache size.
 void unloadCatalogs(java.lang.String user, java.util.Vector catalogNames)
          Unloads the file name of the catalog form cache.
 void unloadCatalogs(java.util.Vector catalogNames)
          Unloads the file name of the catalog form cache.
 void unloadReports(java.util.Vector reportNames)
          Unloads the file name of the report needed to be cached.
 void unloadReportsWithStyles(java.lang.String user, java.util.Vector reportNamesWithStyles)
          Unloads the file name and style of the report needed to be cached.
 void unloadReportsWithStyles(java.util.Vector reportNamesWithStyles)
          Unloads the file name and style of the report needed to be cached.
 boolean unlockCachedImage(java.lang.String catFile, java.lang.String imgFile, java.lang.String user)
          Unlocks a cached image.
 

Method Detail

setEnableCacheCatelog

void setEnableCacheCatelog(boolean isEnableCacheCatelog)
Sets whether to cache the catalog.

Parameters:
isEnableCacheCatelog - whether to cache the catalog.

getEnableCacheCatelog

boolean getEnableCacheCatelog()
Returns whether to cache the catalog.

Returns:
whether to cache the catalog.

setMaxCacheCatalogSize

void setMaxCacheCatalogSize(int maxCacheCatalog)
Sets the max number of the catalogs to be cached.

Parameters:
maxCacheCatalog - the max number of the catalogs to be cached.

getMaxCacheCatalogSize

int getMaxCacheCatalogSize()
Returns the max number of the catalogs to be cached.

Returns:
the max number of the catalogs to be cached.

setEnableCacheImage

void setEnableCacheImage(boolean isEnableCacheImage)
Sets whether to cache the image.

Parameters:
isEnableCacheImage - whether to cache the image.

setDisplayImageDetail

void setDisplayImageDetail(boolean isDisplay)
Sets whether to display the cached images detail.

Parameters:
isDisplay - whether to display the cached images detail.

getEnableCacheImage

boolean getEnableCacheImage()
Returns whether to cache the image.

Returns:
whether to cache the image.

getDisplayImageDetail

boolean getDisplayImageDetail()
Returns whether to display the cached images detail.

Returns:
whether to display the cached images detail.

setMaxCacheImageSize

void setMaxCacheImageSize(int maxCacheImage)
Sets the max number of the images to be cached.

Parameters:
maxCacheImage - the max number of the images to be cached.

getMaxCacheImageSize

int getMaxCacheImageSize()
Returns the max number of the images to be cached.

Returns:
the max number of the images to be cached.

setCachedCatalogs

boolean setCachedCatalogs(java.util.Vector<java.lang.String> cachedCatalogs)
Sets the file names of the catalog needed to be cached. If it is set successfully, return true;

Parameters:
cachedCatalogs - the file name of the catalog needed to be cached.
Returns:
whether the setting is successful.

setCachedCatalogs

boolean setCachedCatalogs(java.lang.String user,
                          java.util.Vector cachedCatalogs)
Sets the file name of the catalog needed to be cached. If it is set successfully, return true;

Parameters:
user - the user processing cache.
cachedCatalogs - the file name of the catalog needed to cached.
Returns:
whether the setting is successful.

getCachedImages

java.util.Vector getCachedImages()
Returns the file name of the image needed to be cached.

Returns:
the file name of the image needed to be cached.

appendImage

void appendImage(java.lang.String catFile,
                 java.lang.String imgFile,
                 java.lang.String user)
Appends an image to cache.

Parameters:
catFile - catalog file's full path name.
imgFileName - the file name of the image to be appended.
user - the user ID.

removeImage

void removeImage(java.lang.String catFile,
                 java.lang.String imgFile,
                 java.lang.String user)
Removes an image.

Parameters:
catFile - catalog file's full path name.
imgFile - file name of the image to be removed.
user - the user ID.

removeAllImages

void removeAllImages()
Removes all the images.


lockCachedImage

boolean lockCachedImage(java.lang.String catFile,
                        java.lang.String imgFile,
                        java.lang.String user)
Locks a cached image.

Parameters:
catFile - full path name of the catalog.
imgFileName - file name of the image.
user - the user ID.
Returns:
true if locked successfully, return false if the image has already been locked or fails to be locked.

unlockCachedImage

boolean unlockCachedImage(java.lang.String catFile,
                          java.lang.String imgFile,
                          java.lang.String user)
Unlocks a cached image.

Parameters:
catFile - full path name of the catalog.
imgFileName - file name of the image.
user - the user ID.
Returns:
true if locked successfully, return false if the image has already been locked or fails to be locked.

getImageBelongedCatalog

java.lang.String getImageBelongedCatalog(java.lang.String fullImagePath)
Gets the catalog which the special image belongs to.

Parameters:
fullImagePath - full path name of the image.
Returns:
full path name of the catalog.

isLockedImage

boolean isLockedImage(java.lang.String catFile,
                      java.lang.String imgFile,
                      java.lang.String user)
Checks if the image is locked.

Parameters:
catFile - : full path name of the catalog file.
imgFileName - the image file name.
user - the user ID.
Returns:
true if locked, return false if 1) not locked, 2) not in cache, 3) not a image file.

isCacheAllImages

boolean isCacheAllImages()
Checks whether to cache all the images.

Returns:
true if all the images are cached, return false if not.

setCacheAllImages

void setCacheAllImages(boolean isCacheAllImages)
Sets whether to cache all the images.


getUsedImageCacheSize

long getUsedImageCacheSize()
Gets the used image cache size.

Returns:
the used image cache size.

getAnImageSize

long getAnImageSize(java.lang.String catFile,
                    java.lang.String imgFile,
                    java.lang.String user)
Gets an image size in memory.

Parameters:
catFile - full path name of the catalog file, such as /SampleReports/Sample.cat.
imgFileName - the image file name.
user - the user ID.
Returns:
an image size in memory.

getCachedCatalogs

java.util.Vector getCachedCatalogs()
Returns the file name of the catalog needed to be cached.

Returns:
the file name of the catalog needed to be cached.

setEnableCacheReport

void setEnableCacheReport(boolean isEnableCacheReport)
Sets whether to cache report.

Parameters:
isEnableCacheReport - whether to cache report.

getEnableCacheReport

boolean getEnableCacheReport()
Returns whether to cache report.

Returns:
whether to cache report.

setMaxCacheReportSize

void setMaxCacheReportSize(int maxCacheReport)
Sets max number of the reports to be cached.

Parameters:
maxCacheReport - max number of the reports to be cached.

getMaxCacheReportSize

int getMaxCacheReportSize()
Returns max number of the reports to be cached.

Returns:
max number of the reports to be cached.

setCachedReports

boolean setCachedReports(java.util.Vector cachedReports)
Sets the file name of the report needed to be cached. If it is set successfully, return true;

Parameters:
cachedReports - the file name of the report needed to be cached.

setCachedReportsWithStyles

boolean setCachedReportsWithStyles(java.util.Vector cachedReportsWithStyles)
Sets the file names and styles of the report needed to cached. If set successfully, return true;

Parameters:
cachedReportsWithStyles - the file names and styles of the report needed to be cached.
Returns:
whether the setting is successful.

setCachedReportsWithStyles

boolean setCachedReportsWithStyles(java.lang.String user,
                                   java.util.Vector cachedReportsWithStyles)
Sets the file names and styles of the report needed to be cached.If set successfully, return true;

Parameters:
cachedReportsWithStyles - the file names and styles of the report needed to be cached.
user - the user processing cache.
Returns:
whether the setting is successful.

getCachedReports

java.util.Vector getCachedReports()
Returns the file names of the report needed to be cached.

Returns:
the file names of the report needed to be cached.

getCachedReportsWithStyles

java.util.Vector getCachedReportsWithStyles()
Returns the file names and styles of the report needed to be cached.

Returns:
the file names and styles of the report needed to be cached.

unloadCatalogs

void unloadCatalogs(java.util.Vector catalogNames)
Unloads the file name of the catalog form cache.

Parameters:
catalogNames - the vector which is the file name of the catalog needed to be unloaded.

unloadCatalogs

void unloadCatalogs(java.lang.String user,
                    java.util.Vector catalogNames)
Unloads the file name of the catalog form cache.

Parameters:
catalogNames - the vector which is the file name of the catalog needed to be unloaded.

unloadReports

void unloadReports(java.util.Vector reportNames)
Unloads the file name of the report needed to be cached.

Parameters:
reportNames - the vector which is the file name of the report needed to be unloaded.

unloadReportsWithStyles

void unloadReportsWithStyles(java.util.Vector reportNamesWithStyles)
Unloads the file name and style of the report needed to be cached.

Parameters:
reportNamesWithStyles - the vector which is the file name and style of the report needed to be unloaded.

unloadReportsWithStyles

void unloadReportsWithStyles(java.lang.String user,
                             java.util.Vector reportNamesWithStyles)
Unloads the file name and style of the report needed to be cached.

Parameters:
reportNamesWithStyles - the vector which is file name and style of the report needed to be unloaded.
user - the user processing cache.

setSecurityUserCacheSize

void setSecurityUserCacheSize(int size)
Sets the security user cache size. If the cache size is set to zero or negative, it means to turn off the security user cache.

Parameters:
size -

getSecurityUserCacheSize

int getSecurityUserCacheSize()
Gets the security user cache size.

Returns:
the security user cache size.

setSecurityRoleCacheSize

void setSecurityRoleCacheSize(int size)
Sets the security role cache size. If the cache size is set to zero or negative, it means to turn off the security role cache.

Parameters:
size -

getSecurityRoleCacheSize

int getSecurityRoleCacheSize()
Gets the security role cache size.

Returns:
the security role cache size.

setSecurityGroupCacheSize

void setSecurityGroupCacheSize(int size)
Sets the security group cache size. If the cache size is set to zero or negative, it means to turn off the security group cache.

Parameters:
size -

getSecurityGroupCacheSize

int getSecurityGroupCacheSize()
Gets the security group cache size.

Returns:
the security group cache size.

setSecurityProtectionCacheSize

void setSecurityProtectionCacheSize(int size)
Sets the security protection cache size. If the cache size is set to zero or negative, it means to turn off the security protection cache.

Parameters:
size -

getSecurityProectionCacheSize

int getSecurityProectionCacheSize()
Gets the security protection cache size.

Returns:
the security protection cache size.

getSecurityCacheExpireTime

int getSecurityCacheExpireTime()
Gets the expire time of the security cache object.

Returns:
the expire time of the security cache object, the 0 indicates the cached object will never expire.

setSecurityCacheExpireTime

void setSecurityCacheExpireTime(int expireTime)
Set the expire time of the security cache object.

Parameters:
the - expire time of the security cache object, the 0 indicates the cached object will never expire.

loadProperties

void loadProperties()
Loads the properties of server.


saveProperties

void saveProperties()
Saves the modified settings to the configuration file (server.properties).


getEngineSortBufferSize

int getEngineSortBufferSize()
Gets the size of engine sort buffer from the configuration properties.


setEngineSortBufferSize

void setEngineSortBufferSize(int size)
Sets the size of the engine sort buffer.

Parameters:
size - the size of the engine sort buffer.

setCRDMemoryUsage

void setCRDMemoryUsage(int maxMemoryUsage)
Sets the CRD memory usage.

Parameters:
maxMemoryUsage - the maximum memory which is used to cache CRD data. the minimum value of it is 4MB, and it can increase the times of the MB. the maximum value is JVM current max heap size*80%.
Since:
v10

getCRDMemoryUsage

int getCRDMemoryUsage()
Gets the CRD memory usage.

Returns:
the maximum CRD memory usage.
Since:
v10

isAutoCache

boolean isAutoCache()
Checks whether the automatic cache is enabled.

Returns:
true if the automatic cache is enabled, otherwise false.
Since:
v10

setEnableAutoCache

void setEnableAutoCache(boolean isEnableAutoCache)
Enables/disables the automatic cache.

Parameters:
isEnableAutoCache - true if the automatic cache is enabled.
Since:
v10

setMaxDiskUsage

void setMaxDiskUsage(int maxDiskUsage)
Sets the maximum hard disk space which is used to automatically cache data.

Parameters:
maxDiskUsage - the maximum hard disk space which is used to cache CRD data. the minimum value of it is 4MB. the maximum value is 1024*1024 MB.
Since:
v10

getMaxDiskUsage

int getMaxDiskUsage()
Gets the maximum hard disk space which is used to automatically cache data.

Returns:
the maximum hard disk space which is used to automatically cache data.
Since:
v10

isNeverExpire

boolean isNeverExpire()
Checks whether the automatic cache data is never expired.

Returns:
true if the automatic cache data is never expired, false if the expired time is customized.
Since:
v10

setNeverExpire

void setNeverExpire(boolean isNeverExpire)
Sets whether the automatic cache data is never expired.

Parameters:
isNeverExpire - true if the automatic cache data is never expired, false if the expired time is customized.
Since:
v10

setExpiredTime

void setExpiredTime(long expiredTime)
Sets the expired time of the automatic cache data.

Parameters:
expiredTime - the customized expired time of the automatic cache data. the unit is second.
Since:
v10

getExpiredTime

long getExpiredTime()
Gets the expired time of the automatic cache data.

Returns:
the customized expired time of the automatic cache data. the unit is second.
Since:
v10

getMaxCubeMemory

double getMaxCubeMemory()
Returns Maximum Cube Memory Allowed, unit is MB.


setMaxCubeMemory

void setMaxCubeMemory(double memorySize)
Sets Maximum Cube Memory Allowed, unit is MB.

Parameters:
memorySize - Maximum Cube Memory Allowed, unit is MB.