Package org.aspectj.weaver.tools.cache
Class AsynchronousFileCacheBacking
- java.lang.Object
-
- org.aspectj.weaver.tools.cache.AbstractCacheBacking
-
- org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
-
- org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
-
- org.aspectj.weaver.tools.cache.AsynchronousFileCacheBacking
-
- All Implemented Interfaces:
CacheBacking
- Direct Known Subclasses:
FlatFileCacheBacking,ZippedFileCacheBacking
public abstract class AsynchronousFileCacheBacking extends AbstractIndexedFileCacheBacking
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAsynchronousFileCacheBacking.AbstractCommandstatic interfaceAsynchronousFileCacheBacking.AsyncCommandstatic interfaceAsynchronousFileCacheBacking.AsynchronousFileCacheBackingCreator<T extends AsynchronousFileCacheBacking>static classAsynchronousFileCacheBacking.ClearCommandstatic classAsynchronousFileCacheBacking.InsertCommandstatic classAsynchronousFileCacheBacking.KeyedCommandstatic classAsynchronousFileCacheBacking.RemoveCommandstatic classAsynchronousFileCacheBacking.UpdateIndexCommand-
Nested classes/interfaces inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
AbstractIndexedFileCacheBacking.IndexEntry
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,byte[]>bytesMapprotected Map<String,byte[]>exposedBytesprotected Map<String,AbstractIndexedFileCacheBacking.IndexEntry>exposedIndexprotected Map<String,AbstractIndexedFileCacheBacking.IndexEntry>index-
Fields inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
EMPTY_INDEX, EMPTY_KEYS, INDEX_FILE
-
Fields 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
Constructors Modifier Constructor Description protectedAsynchronousFileCacheBacking(File cacheDir)
-
Method Summary
-
Methods inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
createIndexEntry, getIndexFile, getKeys, readIndex, readIndex, readIndex, resolveIndexMapEntry, writeIndex, writeIndex, writeIndex, writeIndex, writeIndex
-
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
-
-
-
-
Field Detail
-
index
protected final Map<String,AbstractIndexedFileCacheBacking.IndexEntry> index
-
exposedIndex
protected final Map<String,AbstractIndexedFileCacheBacking.IndexEntry> exposedIndex
-
-
Constructor Detail
-
AsynchronousFileCacheBacking
protected AsynchronousFileCacheBacking(File cacheDir)
-
-
Method Detail
-
getIndex
protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry> getIndex()
- Specified by:
getIndexin classAbstractIndexedFileCacheBacking
-
get
public CachedClassEntry get(CachedClassReference ref, byte[] originalBytes)
-
put
public void put(CachedClassEntry entry, byte[] originalBytes)
-
remove
public void remove(CachedClassReference ref)
-
remove
protected AbstractIndexedFileCacheBacking.IndexEntry remove(String key)
-
getIndexEntries
public List<AbstractIndexedFileCacheBacking.IndexEntry> getIndexEntries()
-
getIndexMap
public Map<String,AbstractIndexedFileCacheBacking.IndexEntry> getIndexMap()
-
clear
public void clear()
-
executeCommand
protected void executeCommand(AsynchronousFileCacheBacking.AsyncCommand cmd) throws Exception
- Throws:
Exception
-
executeUpdateIndexCommand
protected void executeUpdateIndexCommand() throws Exception- Throws:
Exception
-
executeInsertCommand
protected void executeInsertCommand(AsynchronousFileCacheBacking.InsertCommand cmd) throws Exception
- Throws:
Exception
-
executeRemoveCommand
protected void executeRemoveCommand(AsynchronousFileCacheBacking.RemoveCommand cmd) throws Exception
- Throws:
Exception
-
removeClassBytes
protected abstract void removeClassBytes(String key) throws Exception
- Throws:
Exception
-
readClassBytes
protected abstract Map<String,byte[]> readClassBytes(Map<String,AbstractIndexedFileCacheBacking.IndexEntry> indexMap, File cacheDir)
-
createBacking
protected static final <T extends AsynchronousFileCacheBacking> T createBacking(File cacheDir, AsynchronousFileCacheBacking.AsynchronousFileCacheBackingCreator<T> creator)
-
postCacheCommand
public static final boolean postCacheCommand(AsynchronousFileCacheBacking.AsyncCommand cmd)
-
-