|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.adapter.integrations.PersistentCacheManager
public class PersistentCacheManager
This class implements a few common functions for remembering information about the local copies of integration data. This should be extended if any of these methods are inadequate. It uses a gsa repository to store the times of each import and a flag indicating if a particular item is invalid. Created: Wed Aug 28 09:29:24 2002
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
INTEGRATION_DATA_ITEM
|
static java.lang.String |
KEY_DELIMITER
|
static java.lang.String |
LAST_IMPORT_TIME
|
static java.lang.String |
STATE
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
PersistentCacheManager()
|
Method Summary | |
---|---|
void |
addedRemoteItem(RepositoryItem pItem,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
Command pCommand)
Update the time for the add command. |
void |
changeItemState(java.lang.String pId,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
java.lang.Integer pState)
Change the state of the given item to UNKNOWN |
java.lang.String |
getCommandName(Command pCommand)
Get the name of the command. |
MutableRepository |
getIntegrationData()
The repository that stores the command information for remote integration data |
java.lang.String |
getItemType(java.lang.String pId,
RepositoryItemDescriptor pItemDescriptor)
Return the item descriptor name that stores the integration date for the given item |
java.lang.String |
getKey(java.lang.String pId,
RepositoryItemDescriptor pItemDescriptor)
Get the composite key for the given item |
java.lang.Integer |
getState(RepositoryItem pItem)
Get the state as Integer for this item. |
java.lang.String |
getStringState(java.lang.Integer state,
atg.adapter.integrations.IntegrationRepository repository)
Takes an Integer representing the State of the repository item as input, and generates the corresponding String value for the state. |
void |
importedRemoteItem(RepositoryItem pItem,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
Command pCommand)
Update the cache entry for this item. |
boolean |
isLocalItemInvalid(java.lang.String pId,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
Command pCommand)
Check if the local item is still valid. |
boolean |
isTransientCacheData()
If true, then all cache data is transient. |
void |
removedRemoteItem(java.lang.String pId,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
Command pCommand)
Update the time for the remove command. |
void |
setIntegrationData(MutableRepository pIntegrationData)
|
void |
setTransientCacheData(boolean pTransientCacheData)
|
void |
updatedRemoteItem(RepositoryItem pItem,
atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor,
Command pCommand)
Update the time for the update command. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static java.lang.String INTEGRATION_DATA_ITEM
public static java.lang.String STATE
public static java.lang.String LAST_IMPORT_TIME
public static java.lang.String KEY_DELIMITER
Constructor Detail |
---|
public PersistentCacheManager()
Method Detail |
---|
public void setIntegrationData(MutableRepository pIntegrationData)
public MutableRepository getIntegrationData()
public void setTransientCacheData(boolean pTransientCacheData)
public boolean isTransientCacheData()
public boolean isLocalItemInvalid(java.lang.String pId, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, Command pCommand)
localValueValidProperty
is false then the item is invalid. If the item's
lastImportTimeProperty
is more than
localValueTimeout
milliseconds from the current time then
the item is invalid. Otherwise, the item is valid.
pId
- The id of the repository item in questionpItemDescriptor
- The item descriptor for this itempCommand
- The command that will be used to retrieve the item
if it is invalid.
public void changeItemState(java.lang.String pId, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, java.lang.Integer pState)
public void importedRemoteItem(RepositoryItem pItem, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, Command pCommand)
pItem
- The recently imported repository itempItemDescriptor
- The item descriptor for this itempCommand
- The command used to import the itempublic void updatedRemoteItem(RepositoryItem pItem, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, Command pCommand)
public void addedRemoteItem(RepositoryItem pItem, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, Command pCommand)
public void removedRemoteItem(java.lang.String pId, atg.adapter.integrations.IntegrationRepositoryItemDescriptor pItemDescriptor, Command pCommand)
public java.lang.Integer getState(RepositoryItem pItem)
pItem
- The repository item corresponding to an item in Integration repository
public java.lang.String getStringState(java.lang.Integer state, atg.adapter.integrations.IntegrationRepository repository)
public java.lang.String getKey(java.lang.String pId, RepositoryItemDescriptor pItemDescriptor)
public java.lang.String getCommandName(Command pCommand)
public java.lang.String getItemType(java.lang.String pId, RepositoryItemDescriptor pItemDescriptor)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |