Top Description Methods
org.aspectj.weaver.tools.cache

public Interface CacheBacking

Known Direct Implementers
org.aspectj.weaver.tools.cache.AbstractCacheBacking

Interface for the backing to the cache; usually a file, but could be an in-memory backing for testing.

aspectj and jvmti provide no suitable guarantees on locking for class redefinitions, so every implementation must have a some locking mechanism to prevent invalid reads.

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Clear the entire cache

public CachedClassEntry

Returns:

the cached bytes or null, if the entry does not exist
get
(CachedClassReference
entry to retrieve
ref
,
byte[]
Pre-weaving class bytes - required in order to ensure that the cached entry refers to the same original class
originalBytes
)

Get a cache entry

public String[]
getKeys(String regex)

Return a list of keys which match the given regex.

public void
put(CachedClassEntry
key of the entry
entry
,
byte[]
Pre-weaving class bytes - required in order to ensure that the cached entry refers to the same original class
originalBytes
)

Put an entry in the cache

public void
remove(CachedClassReference ref)

Remove an entry from the cache

Method Detail

clearback to summary
public void clear()

Clear the entire cache

getback to summary
public CachedClassEntry get(CachedClassReference ref, byte[] originalBytes)

Get a cache entry

Parameters
ref:CachedClassReference

entry to retrieve

originalBytes:byte[]

Pre-weaving class bytes - required in order to ensure that the cached entry refers to the same original class

Returns:CachedClassEntry

the cached bytes or null, if the entry does not exist

getKeysback to summary
public String[] getKeys(String regex)

Return a list of keys which match the given regex.

putback to summary
public void put(CachedClassEntry entry, byte[] originalBytes)

Put an entry in the cache

Parameters
entry:CachedClassEntry

key of the entry

originalBytes:byte[]

Pre-weaving class bytes - required in order to ensure that the cached entry refers to the same original class

removeback to summary
public void remove(CachedClassReference ref)

Remove an entry from the cache