public class KARCacheManager extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KAR_CONTENTS_TABLE_NAME |
static java.lang.String |
KAR_ERRORS_TABLE_NAME |
static java.lang.String |
KARS_CACHED_TABLE_NAME
Table Names
|
Constructor and Description |
---|
KARCacheManager() |
Modifier and Type | Method and Description |
---|---|
void |
clearKARCache() |
static KARCacheManager |
getInstance()
Method for getting an instance of this singleton class.
|
java.util.Vector<KARCacheContent> |
getKARCacheContents()
Return all of the KARCacheContents.
|
java.util.Vector<KARCacheContent> |
getKARCacheContents(java.io.File karFile)
Return all of the KARCacheContents in the specified KAR file.
|
java.util.Vector<KARCacheContent> |
getKARCacheContents(KeplerLSID lsid)
Return all of the KARCacheContents matching the specified lsid.
|
java.util.Vector<KARCacheContent> |
getKARCacheContents(java.lang.String type)
Return all of the KARCacheContents matching the specified type.
|
java.util.Vector<KARCacheError> |
getKARCacheErrors() |
long |
getLastModifiedTimeOfFileInCache(java.lang.String filename)
Get the last modified time of a file in the cache.
|
void |
insertEntryIntoCache(java.io.File karFile,
KeplerLSID entryLSID,
java.lang.String entryName,
java.lang.String entryType) |
boolean |
insertIntoCache(KARFile karFile)
Insert a KARFile into the KARS_CACHED table.
|
boolean |
insertKARError(KARFile karFile) |
boolean |
isCached(java.io.File karFile)
Determine if the KAR represented by the supplied File has already been
cached.
|
boolean |
isCached(KeplerLSID karLSID)
Deprecated.
Cached Kars now use the File as the primary key Use
isCached(File) instead
|
boolean |
removeKARFromCache(java.io.File karFile)
Remove a KAR file from the cache.
|
boolean |
synchronizeKARCacheWithLocalRepositories()
Update the KAR cache tables to reflect the kar files on disk.
|
public static final java.lang.String KARS_CACHED_TABLE_NAME
public static final java.lang.String KAR_ERRORS_TABLE_NAME
public static final java.lang.String KAR_CONTENTS_TABLE_NAME
public KARCacheManager()
public java.util.Vector<KARCacheError> getKARCacheErrors()
public java.util.Vector<KARCacheContent> getKARCacheContents()
public java.util.Vector<KARCacheContent> getKARCacheContents(java.lang.String type)
type
- public java.util.Vector<KARCacheContent> getKARCacheContents(KeplerLSID lsid)
type
- public java.util.Vector<KARCacheContent> getKARCacheContents(java.io.File karFile)
type
- public void clearKARCache()
public boolean synchronizeKARCacheWithLocalRepositories()
public boolean removeKARFromCache(java.io.File karFile)
karLSID
- the LSID of the kar to removepublic boolean insertKARError(KARFile karFile)
karFile
- public boolean insertIntoCache(KARFile karFile)
karFile
- public void insertEntryIntoCache(java.io.File karFile, KeplerLSID entryLSID, java.lang.String entryName, java.lang.String entryType)
public boolean isCached(KeplerLSID karLSID)
karLSID
- public boolean isCached(java.io.File karFile)
File
- karFilepublic long getLastModifiedTimeOfFileInCache(java.lang.String filename)
public static KARCacheManager getInstance()