Package org.aspectj.weaver.tools.cache
Class FlatFileCacheBacking
- All Implemented Interfaces:
- CacheBacking
Uses a "flat" files model to store the cached instrumented classes
 and aspects - i.e., each class/aspect is stored as a separate (binary)
 file. This is a good mechanism when the number of instrumented class is
 relatively small (a few 10's). The reason for it is that scanning a folder
 that has many files in it quickly becomes an I/O bottleneck. Also, some
 O/S-es may impose internal limits on the maximum number of "children"
 a folder node may have. On the other hand, it is much faster (again, for
 small number of instrumented classes) than the ZIP cache since each class/aspect
 is represented by a single file - thus adding/removing/modifying it is easier.
- Author:
- Lyor Goldstein
- 
Nested Class SummaryNested classes/interfaces inherited from class org.aspectj.weaver.tools.cache.AsynchronousFileCacheBackingAsynchronousFileCacheBacking.AbstractCommand, AsynchronousFileCacheBacking.AsyncCommand, AsynchronousFileCacheBacking.AsynchronousFileCacheBackingCreator<T extends AsynchronousFileCacheBacking>, AsynchronousFileCacheBacking.ClearCommand, AsynchronousFileCacheBacking.InsertCommand, AsynchronousFileCacheBacking.KeyedCommand, AsynchronousFileCacheBacking.RemoveCommand, AsynchronousFileCacheBacking.UpdateIndexCommandNested classes/interfaces inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBackingAbstractIndexedFileCacheBacking.IndexEntry
- 
Field SummaryFields inherited from class org.aspectj.weaver.tools.cache.AsynchronousFileCacheBackingbytesMap, exposedBytes, exposedIndex, indexFields inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBackingEMPTY_INDEX, EMPTY_KEYS, INDEX_FILEFields inherited from class org.aspectj.weaver.tools.cache.AbstractFileCacheBackingWEAVED_CLASS_CACHE_DIRFields inherited from class org.aspectj.weaver.tools.cache.AbstractCacheBackinglogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic final FlatFileCacheBackingcreateBacking(File cacheDir) readClassBytes(Map<String, AbstractIndexedFileCacheBacking.IndexEntry> indexMap, File cacheDir) readClassBytes(Map<String, AbstractIndexedFileCacheBacking.IndexEntry> indexMap, File[] files) protected voidremoveClassBytes(String key) protected voidwriteClassBytes(String key, byte[] bytes) Methods inherited from class org.aspectj.weaver.tools.cache.AsynchronousFileCacheBackingclear, createBacking, executeClearCommand, executeCommand, executeInsertCommand, executeRemoveCommand, executeUpdateIndexCommand, get, getBytesMap, getIndex, getIndexEntries, getIndexMap, postCacheCommand, put, remove, remove, toStringMethods inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBackingcreateIndexEntry, getIndexFile, getKeys, readIndex, readIndex, readIndex, writeIndex, writeIndex, writeIndex, writeIndex, writeIndexMethods inherited from class org.aspectj.weaver.tools.cache.AbstractFileCacheBackingclose, close, delete, getCacheDirectoryMethods inherited from class org.aspectj.weaver.tools.cache.AbstractCacheBackingcrc
- 
Constructor Details- 
FlatFileCacheBacking
 
- 
- 
Method Details- 
createBacking
- 
readClassBytesprotected Map<String,byte[]> readClassBytes(Map<String, AbstractIndexedFileCacheBacking.IndexEntry> indexMap, File cacheDir) - Specified by:
- readClassBytesin class- AsynchronousFileCacheBacking
 
- 
readClassBytes
- 
resolveIndexMapEntryprotected AbstractIndexedFileCacheBacking.IndexEntry resolveIndexMapEntry(File cacheDir, AbstractIndexedFileCacheBacking.IndexEntry ie) - Overrides:
- resolveIndexMapEntryin class- AbstractIndexedFileCacheBacking
 
- 
writeClassBytes- Overrides:
- writeClassBytesin class- AbstractFileCacheBacking
- Throws:
- Exception
 
- 
removeClassBytesDescription copied from class:AsynchronousFileCacheBacking- Specified by:
- removeClassBytesin class- AsynchronousFileCacheBacking
- Parameters:
- key- The key representing the class whose bytes are to be removed
- Throws:
- Exception- if failed to remove class bytes
 
 
-