|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.mdm.blobs.ObjectCache
A class for caching images, PDFs, text blocks, etc.
| Field Summary | |
static int |
ON_STARTUP_ALWAYS_REMOVE_FILES
On startup, always remove the blob files from cache directory. |
static int |
ON_STARTUP_IF_NO_CACHE_REMOVE_FILES
On startup, remove the blob files from cache directory if cache info doesn't exist or is invalid. |
static int |
ON_STARTUP_NEVER_REMOVE_FILES
On startup, never remove any blob files from cache directory. |
| Constructor Summary | |
ObjectCache(ConnectionAccessor connection)
Empty constructor. |
|
| Method Summary | |
String |
getCacheDirectory()
Returns the cache directory. |
String |
getConnectionTag()
Returns the connection tag. |
RegionProperties |
getDataRegion()
Returns the data region. |
int |
getMaximumCacheSize()
Returns the maximum cache size before files are removed as needed. |
String |
getObject(TableId tableId,
RecordId recordId)
Returns the relative file path for the object. |
String |
getObject(TableId tableId,
RecordId recordId,
ImageVariantId variantId)
Returns the relative file path for the object. |
Passport |
getPassport()
Returns the passport use for tracing. |
RepositoryIdentifier |
getRepositoryIdentifier()
Returns the repository. |
String |
getRepositoryUserName()
Returns the repository user name. |
String |
getRepositoryUserPassword()
Returns the repository user password. |
int |
getStartupType()
Returns the start up type. |
void |
initialize()
Initializes the object cache manager. |
void |
preload(TableId tableId,
ImageVariantId variantId)
Pre-loads all objects from the table until the cache is full. |
void |
setCacheDirectory(String cacheDirectory)
Sets the cache directory. |
void |
setConnectionTag(String connectionTag)
Sets the connection tag (required). |
void |
setDataRegion(RegionProperties dataRegion)
Sets the data region (required). |
void |
setMaximumCacheSize(int maxCacheSize)
The maximum cache size in kilobytes. |
void |
setPassport(Passport passport)
Sets the passport use for tracing. |
void |
setReposIdentifier(RepositoryIdentifier reposId)
Sets the repository (required). |
void |
setRepositoryUserName(String repositoryUserName)
Sets the repository user name (required). |
void |
setRepositoryUserPassword(String repositoryUserPassword)
Sets the repository user password. |
void |
setStartupType(int startupType)
Sets the startup type. |
void |
shutdown()
Shuts down the object cache manager. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ON_STARTUP_ALWAYS_REMOVE_FILES
public static final int ON_STARTUP_IF_NO_CACHE_REMOVE_FILES
public static final int ON_STARTUP_NEVER_REMOVE_FILES
| Constructor Detail |
public ObjectCache(ConnectionAccessor connection)
| Method Detail |
public String getConnectionTag()
ConnectionPoolFactorypublic void setConnectionTag(String connectionTag)
localhost.
connectionTag - a connection tagpublic RepositoryIdentifier getRepositoryIdentifier()
public void setReposIdentifier(RepositoryIdentifier reposId)
reposId - a repositorypublic String getRepositoryUserName()
public void setRepositoryUserName(String repositoryUserName)
repositoryUserName - a repository user namepublic String getRepositoryUserPassword()
public void setRepositoryUserPassword(String repositoryUserPassword)
repositoryUserPassword - a repository user passwordpublic RegionProperties getDataRegion()
public void setDataRegion(RegionProperties dataRegion)
dataRegion - a data regionpublic int getStartupType()
public void setStartupType(int startupType)
ON_STARTUP_NEVER_REMOVE_FILES.
startupType - a start up typepublic String getCacheDirectory()
public void setCacheDirectory(String cacheDirectory)
ObjectCache should have it's own cache
directory.
cacheDirectory - a directorypublic int getMaximumCacheSize()
public void setMaximumCacheSize(int maxCacheSize)
maxCacheSize - the maximum sizepublic Passport getPassport()
PassportSupport
getPassport in interface PassportSupportpublic void setPassport(Passport passport)
passport - a passport
public void initialize()
throws CommandException
CommandException - if there is an error in executing the command.
public String getObject(TableId tableId,
RecordId recordId)
throws CommandException
tableId - a table IdrecordId - a record Id
CommandException - if there is an error in executing the command.
public String getObject(TableId tableId,
RecordId recordId,
ImageVariantId variantId)
throws CommandException
tableId - a table IdrecordId - a record IdvariantId - the image variant
CommandException - if there is an error in executing the command.
public void preload(TableId tableId,
ImageVariantId variantId)
throws CommandException
tableId - a table IdvariantId - a variant Id
CommandException - if there is an error in executing the command.
public void shutdown()
throws CommandException
CommandException - if there is an error in executing the command.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2004-2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.