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
Nested ClassesModifier and TypeClassDescriptionstatic classThe default index entry in the index file -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final AbstractIndexedFileCacheBacking.IndexEntry[]protected static final String[]static final StringDefault name of cache index file - assumed to containAbstractIndexedFileCacheBacking.IndexEntry-sFields inherited from class org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
WEAVED_CLASS_CACHE_DIRFields inherited from class org.aspectj.weaver.tools.cache.AbstractCacheBacking
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final AbstractIndexedFileCacheBacking.IndexEntrycreateIndexEntry(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> protected voidprotected voidwriteIndex(File file) protected voidwriteIndex(File indexFile, Collection<? extends AbstractIndexedFileCacheBacking.IndexEntry> entries) protected voidwriteIndex(File indexFile, Map<String, ? extends AbstractIndexedFileCacheBacking.IndexEntry> index) protected voidwriteIndex(File indexFile, AbstractIndexedFileCacheBacking.IndexEntry... entries) Methods inherited from class org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
close, close, delete, getCacheDirectory, writeClassBytesMethods inherited from class org.aspectj.weaver.tools.cache.AbstractCacheBacking
crcMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
-
EMPTY_INDEX
-
EMPTY_KEYS
-
-
Constructor Details
-
AbstractIndexedFileCacheBacking
-
-
Method Details
-
getIndexFile
-
getKeys
Description copied from interface:CacheBackingReturn 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)
-