org.aspectj.weaver.tools.cache
Class AbstractIndexedFileCacheBacking
java.lang.Object
org.aspectj.weaver.tools.cache.AbstractCacheBacking
org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
- All Implemented Interfaces:
- CacheBacking
- Direct Known Subclasses:
- AsynchronousFileCacheBacking, DefaultFileCacheBacking
public abstract class AbstractIndexedFileCacheBacking
- extends AbstractFileCacheBacking
Uses an index
file to keep track of the cached entries
Method Summary |
static AbstractIndexedFileCacheBacking.IndexEntry |
createIndexEntry(CachedClassEntry classEntry,
byte[] originalBytes)
|
protected abstract java.util.Map<java.lang.String,AbstractIndexedFileCacheBacking.IndexEntry> |
getIndex()
|
java.io.File |
getIndexFile()
|
java.lang.String[] |
getKeys(java.lang.String regex)
Return a list of keys which match the given
regex. |
protected java.util.Map<java.lang.String,AbstractIndexedFileCacheBacking.IndexEntry> |
readIndex()
|
AbstractIndexedFileCacheBacking.IndexEntry[] |
readIndex(java.io.File indexFile)
|
protected java.util.Map<java.lang.String,AbstractIndexedFileCacheBacking.IndexEntry> |
readIndex(java.io.File cacheDir,
java.io.File cacheFile)
|
protected AbstractIndexedFileCacheBacking.IndexEntry |
resolveIndexMapEntry(java.io.File cacheDir,
AbstractIndexedFileCacheBacking.IndexEntry ie)
|
protected void |
writeIndex()
|
protected void |
writeIndex(java.io.File file)
|
protected void |
writeIndex(java.io.File indexFile,
AbstractIndexedFileCacheBacking.IndexEntry... entries)
|
protected void |
writeIndex(java.io.File indexFile,
java.util.Collection<? extends AbstractIndexedFileCacheBacking.IndexEntry> entries)
|
protected void |
writeIndex(java.io.File indexFile,
java.util.Map<java.lang.String,? extends AbstractIndexedFileCacheBacking.IndexEntry> index)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INDEX_FILE
public static final java.lang.String INDEX_FILE
- Default name of cache index file - assumed to contain
AbstractIndexedFileCacheBacking.IndexEntry
-s
- See Also:
- Constant Field Values
EMPTY_INDEX
protected static final AbstractIndexedFileCacheBacking.IndexEntry[] EMPTY_INDEX
EMPTY_KEYS
protected static final java.lang.String[] EMPTY_KEYS
AbstractIndexedFileCacheBacking
protected AbstractIndexedFileCacheBacking(java.io.File cacheDir)
getIndexFile
public java.io.File getIndexFile()
getKeys
public java.lang.String[] getKeys(java.lang.String regex)
- Description copied from interface:
CacheBacking
- Return a list of keys which match the given
regex.
- Returns:
readIndex
protected java.util.Map<java.lang.String,AbstractIndexedFileCacheBacking.IndexEntry> readIndex()
writeIndex
protected void writeIndex()
writeIndex
protected void writeIndex(java.io.File file)
getIndex
protected abstract java.util.Map<java.lang.String,AbstractIndexedFileCacheBacking.IndexEntry> getIndex()
readIndex
protected java.util.Map<java.lang.String,AbstractIndexedFileCacheBacking.IndexEntry> readIndex(java.io.File cacheDir,
java.io.File cacheFile)
resolveIndexMapEntry
protected AbstractIndexedFileCacheBacking.IndexEntry resolveIndexMapEntry(java.io.File cacheDir,
AbstractIndexedFileCacheBacking.IndexEntry ie)
readIndex
public AbstractIndexedFileCacheBacking.IndexEntry[] readIndex(java.io.File indexFile)
writeIndex
protected void writeIndex(java.io.File indexFile,
java.util.Map<java.lang.String,? extends AbstractIndexedFileCacheBacking.IndexEntry> index)
throws java.io.IOException
- Throws:
java.io.IOException
writeIndex
protected void writeIndex(java.io.File indexFile,
AbstractIndexedFileCacheBacking.IndexEntry... entries)
throws java.io.IOException
- Throws:
java.io.IOException
writeIndex
protected void writeIndex(java.io.File indexFile,
java.util.Collection<? extends AbstractIndexedFileCacheBacking.IndexEntry> entries)
throws java.io.IOException
- Throws:
java.io.IOException
createIndexEntry
public static final AbstractIndexedFileCacheBacking.IndexEntry createIndexEntry(CachedClassEntry classEntry,
byte[] originalBytes)