Logo Search packages:      
Sourcecode: visualvm version File versions  Download package

org::netbeans::lib::profiler::classfile::ClassFileCache Class Reference

List of all members.


Detailed Description

Fixed-size cache of binary classes (.class files). Used to avoid flooding memory with class files when performing intensive method scanning, that may touch thousands of classes. Currently uses LRU eviction policy. A separate, currently no-eviction cache, is maintained for classes supplied by the VM.

Author:
Misha Dmitirev

Definition at line 61 of file ClassFileCache.java.


Package Functions

void addVMSuppliedClassFile (String name, int classLoaderId, byte[] buf)
byte[] getClassFile (String name, String location) throws IOException
int hasVMSuppliedClassFile (String name, int classLoaderId)

Static Package Functions

static ClassFileCache getDefault ()
static void resetDefaultCache ()

Private Member Functions

byte[] get (String nameAndLocation)
byte[] readAndPut (String name, String classFileLocation, String nameAndLocation) throws IOException
byte[] readClassFile (String name, String classFileLocation) throws IOException
void removeLRUEntry ()

Private Attributes

int capacity
byte[][] classFileBytes
String[] classNameAndLocation
ClassPath classPath
long[] lastTimeUsed
int size
int sizeLimit
long timeCounter
Hashtable vmSuppliedClassCache

Static Private Attributes

static ClassFileCache defaultClassFileCache

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index