Package org.aspectj.weaver.tools.cache
Class DefaultFileCacheBacking
- 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.DefaultFileCacheBacking
-
- All Implemented Interfaces:
CacheBacking
public class DefaultFileCacheBacking extends AbstractIndexedFileCacheBacking
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
AbstractIndexedFileCacheBacking.IndexEntry
-
-
Field Summary
-
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 protectedDefaultFileCacheBacking(File cacheDir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()static DefaultFileCacheBackingcreateBacking(File cacheDir)static CacheBackingcreateBacking(String scope)protected voiddelete(File file)CachedClassEntryget(CachedClassReference ref, byte[] originalBytes)protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry>getIndex()String[]getKeys(String regex)voidput(CachedClassEntry entry, byte[] originalBytes)protected byte[]read(File file, long expectedCRC)protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry>readIndex()voidremove(CachedClassReference ref)protected AbstractIndexedFileCacheBacking.IndexEntryresolveIndexMapEntry(File cacheDir, AbstractIndexedFileCacheBacking.IndexEntry ie)protected longwrite(File file, byte[] bytes)protected voidwriteIndex()-
Methods inherited from class org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
createIndexEntry, getIndexFile, readIndex, readIndex, writeIndex, writeIndex, writeIndex, writeIndex
-
Methods inherited from class org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
close, close, getCacheDirectory, writeClassBytes
-
Methods inherited from class org.aspectj.weaver.tools.cache.AbstractCacheBacking
crc
-
-
-
-
Constructor Detail
-
DefaultFileCacheBacking
protected DefaultFileCacheBacking(File cacheDir)
-
-
Method Detail
-
createBacking
public static final DefaultFileCacheBacking createBacking(File cacheDir)
-
getIndex
protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry> getIndex()
- Specified by:
getIndexin classAbstractIndexedFileCacheBacking
-
resolveIndexMapEntry
protected AbstractIndexedFileCacheBacking.IndexEntry resolveIndexMapEntry(File cacheDir, AbstractIndexedFileCacheBacking.IndexEntry ie)
- Overrides:
resolveIndexMapEntryin classAbstractIndexedFileCacheBacking
-
readIndex
protected Map<String,AbstractIndexedFileCacheBacking.IndexEntry> readIndex()
- Overrides:
readIndexin classAbstractIndexedFileCacheBacking
-
writeIndex
protected void writeIndex()
- Overrides:
writeIndexin classAbstractIndexedFileCacheBacking
-
clear
public void clear()
-
createBacking
public static CacheBacking createBacking(String scope)
-
getKeys
public String[] getKeys(String regex)
- Specified by:
getKeysin interfaceCacheBacking- Overrides:
getKeysin classAbstractIndexedFileCacheBacking
-
get
public CachedClassEntry get(CachedClassReference ref, byte[] originalBytes)
-
put
public void put(CachedClassEntry entry, byte[] originalBytes)
-
remove
public void remove(CachedClassReference ref)
-
delete
protected void delete(File file)
- Overrides:
deletein classAbstractFileCacheBacking
-
read
protected byte[] read(File file, long expectedCRC)
-
write
protected long write(File file, byte[] bytes)
-
-