Package 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
Uses an
index
file to keep track of the cached entries-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The default index entry in the index file -
Field Summary
Modifier and TypeFieldDescriptionprotected static AbstractIndexedFileCacheBacking.IndexEntry[]
protected static String[]
static String
Default name of cache index file - assumed to containAbstractIndexedFileCacheBacking.IndexEntry
-sFields inherited from class org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
WEAVED_CLASS_CACHE_DIR
Fields inherited from class org.aspectj.weaver.tools.cache.AbstractCacheBacking
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateIndexEntry(CachedClassEntry classEntry, byte[] originalBytes)
protected abstract Map<String,AbstractIndexedFileCacheBacking.IndexEntry>
getIndex()
String[]
Return a list of keys which match the given regex.protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry>
protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry>
resolveIndexMapEntry(File cacheDir, AbstractIndexedFileCacheBacking.IndexEntry ie)
protected void
protected void
writeIndex(File file)
protected void
writeIndex(File indexFile, Collection<? extends AbstractIndexedFileCacheBacking.IndexEntry> entries)
protected void
writeIndex(File indexFile, Map<String,? extends AbstractIndexedFileCacheBacking.IndexEntry> index)
protected void
writeIndex(File indexFile, AbstractIndexedFileCacheBacking.IndexEntry... entries)
Methods inherited from class org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
close, close, delete, getCacheDirectory, writeClassBytes
Methods inherited from class org.aspectj.weaver.tools.cache.AbstractCacheBacking
crc
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.aspectj.weaver.tools.cache.CacheBacking
clear, get, put, remove
-
Field Details
-
INDEX_FILE
Default name of cache index file - assumed to containAbstractIndexedFileCacheBacking.IndexEntry
-s- See Also:
- Constant Field Values
-
EMPTY_INDEX
-
EMPTY_KEYS
-
-
Constructor Details
-
AbstractIndexedFileCacheBacking
-
-
Method Details
-
getIndexFile
-
getKeys
Description copied from interface:CacheBacking
Return a list of keys which match the given regex.- Returns:
-
readIndex
-
writeIndex
protected void writeIndex() -
writeIndex
-
getIndex
-
readIndex
protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry> readIndex(File cacheDir, File cacheFile) -
resolveIndexMapEntry
protected AbstractIndexedFileCacheBacking.IndexEntry resolveIndexMapEntry(File cacheDir, AbstractIndexedFileCacheBacking.IndexEntry ie) -
readIndex
-
writeIndex
protected void writeIndex(File indexFile, Map<String,? extends AbstractIndexedFileCacheBacking.IndexEntry> index) throws IOException- Throws:
IOException
-
writeIndex
protected void writeIndex(File indexFile, AbstractIndexedFileCacheBacking.IndexEntry... entries) throws IOException- Throws:
IOException
-
writeIndex
protected void writeIndex(File indexFile, Collection<? extends AbstractIndexedFileCacheBacking.IndexEntry> entries) throws IOException- Throws:
IOException
-
createIndexEntry
public static final AbstractIndexedFileCacheBacking.IndexEntry createIndexEntry(CachedClassEntry classEntry, byte[] originalBytes)
-