Package org.aspectj.weaver.tools.cache
Klasse 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
- Alle implementierten Schnittstellen:
CacheBacking
Naive File-Backed Class Cache with no expiry or application
centric invalidation.
Enabled with the system property, "aj.weaving.cache.dir" If this system property is not set, no caching will be performed.
A CRC checksum is stored alongside the class file to verify the bytes on read. If for some reason there is an error reading either the class or crc file, or if the crc does not match the class data the cache entry is deleted.
An alternate implementation of this could store the class file as a jar/zip directly, which would have the required crc; as a first pass however it is somewhat useful to view these files in expanded form for debugging.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
AbstractIndexedFileCacheBacking.IndexEntry
-
Feldübersicht
Von Klasse geerbte Felder org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
EMPTY_INDEX, EMPTY_KEYS, INDEX_FILE
Von Klasse geerbte Felder org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
WEAVED_CLASS_CACHE_DIR
Von Klasse geerbte Felder org.aspectj.weaver.tools.cache.AbstractCacheBacking
logger
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
clear()
Clear the entire cachestatic final DefaultFileCacheBacking
createBacking
(File cacheDir) static CacheBacking
createBacking
(String scope) protected void
get
(CachedClassReference ref, byte[] originalBytes) Get a cache entryprotected Map<String,
AbstractIndexedFileCacheBacking.IndexEntry> getIndex()
String[]
Return a list of keys which match the given regex.void
put
(CachedClassEntry entry, byte[] originalBytes) Put an entry in the cacheprotected byte[]
protected Map<String,
AbstractIndexedFileCacheBacking.IndexEntry> void
Remove an entry from the cacheprotected long
protected void
Von Klasse geerbte Methoden org.aspectj.weaver.tools.cache.AbstractIndexedFileCacheBacking
createIndexEntry, getIndexFile, readIndex, readIndex, writeIndex, writeIndex, writeIndex, writeIndex
Von Klasse geerbte Methoden org.aspectj.weaver.tools.cache.AbstractFileCacheBacking
close, close, getCacheDirectory, writeClassBytes
Von Klasse geerbte Methoden org.aspectj.weaver.tools.cache.AbstractCacheBacking
crc
-
Konstruktordetails
-
DefaultFileCacheBacking
-
-
Methodendetails
-
createBacking
-
getIndex
- Angegeben von:
getIndex
in KlasseAbstractIndexedFileCacheBacking
-
resolveIndexMapEntry
protected AbstractIndexedFileCacheBacking.IndexEntry resolveIndexMapEntry(File cacheDir, AbstractIndexedFileCacheBacking.IndexEntry ie) - Setzt außer Kraft:
resolveIndexMapEntry
in KlasseAbstractIndexedFileCacheBacking
-
readIndex
- Setzt außer Kraft:
readIndex
in KlasseAbstractIndexedFileCacheBacking
-
writeIndex
protected void writeIndex()- Setzt außer Kraft:
writeIndex
in KlasseAbstractIndexedFileCacheBacking
-
clear
public void clear()Beschreibung aus Schnittstelle kopiert:CacheBacking
Clear the entire cache -
createBacking
-
getKeys
Beschreibung aus Schnittstelle kopiert:CacheBacking
Return a list of keys which match the given regex.- Angegeben von:
getKeys
in SchnittstelleCacheBacking
- Setzt außer Kraft:
getKeys
in KlasseAbstractIndexedFileCacheBacking
- Gibt zurück:
-
get
Beschreibung aus Schnittstelle kopiert:CacheBacking
Get a cache entry- Parameter:
ref
- entry to retrieveoriginalBytes
- Pre-weaving class bytes - required in order to ensure that the cached entry refers to the same original class- Gibt zurück:
- the cached bytes or null, if the entry does not exist
-
put
Beschreibung aus Schnittstelle kopiert:CacheBacking
Put an entry in the cache- Parameter:
entry
- key of the entryoriginalBytes
- Pre-weaving class bytes - required in order to ensure that the cached entry refers to the same original class
-
remove
Beschreibung aus Schnittstelle kopiert:CacheBacking
Remove an entry from the cache -
delete
- Setzt außer Kraft:
delete
in KlasseAbstractFileCacheBacking
-
read
-
write
-