org.netbeans.lib.profiler.heap
Class HeapFactory

java.lang.Object
  extended by org.netbeans.lib.profiler.heap.HeapFactory

public class HeapFactory
extends Object

This is factory class for creating Heap from the file in Hprof dump format.

Author:
Tomas Hurka

Field Summary
static long DEFAULT_BUFFER
           
 
Constructor Summary
HeapFactory()
           
 
Method Summary
static boolean canBeMemMapped(File heapDump)
           
static Heap createFastHeap(File heapDump)
          Fast Heap implementation is optimized for batch processing of dump.
static Heap createFastHeap(File heapDump, long bufferSize)
          Fast Heap implementation is optimized for batch processing of dump.
static Heap createHeap(File heapDump)
          this factory method creates Heap from a memory dump file in Hprof format.
static Heap createHeap(File heapDump, int segment)
          this factory method creates Heap from a memory dump file in Hprof format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER

public static final long DEFAULT_BUFFER
See Also:
Constant Field Values
Constructor Detail

HeapFactory

public HeapFactory()
Method Detail

createHeap

public static Heap createHeap(File heapDump)
                       throws FileNotFoundException,
                              IOException
this factory method creates Heap from a memory dump file in Hprof format.
This implementation is using temporary disk files for building auxiliary indexes
Speed: slow

Parameters:
heapDump - file which contains memory dump
Returns:
implementation of Heap corresponding to the memory dump passed in heapDump parameter
Throws:
FileNotFoundException - if heapDump file does not exist
IOException - if I/O error occurred while accessing heapDump file

createFastHeap

public static Heap createFastHeap(File heapDump)
                           throws FileNotFoundException,
                                  IOException
Fast Heap implementation is optimized for batch processing of dump. Unlike normal Heap it doesn't create/use any temporary files.

Throws:
FileNotFoundException
IOException

createFastHeap

public static Heap createFastHeap(File heapDump,
                                  long bufferSize)
                           throws FileNotFoundException,
                                  IOException
Fast Heap implementation is optimized for batch processing of dump. Unlike normal Heap it doesn't create/use any temporary files.

Parameters:
bufferSize - if file can be mapped to memory no buffer would be used, overwise limits memory used for buffering
Throws:
FileNotFoundException
IOException

createHeap

public static Heap createHeap(File heapDump,
                              int segment)
                       throws FileNotFoundException,
                              IOException
this factory method creates Heap from a memory dump file in Hprof format. If the memory dump file contains more than one dump, parameter segment is used to select particular dump.
This implementation is using temporary disk files for building auxiliary indexes
Speed: slow

Parameters:
segment - select corresponding dump from multi-dump file
heapDump - file which contains memory dump
Returns:
implementation of Heap corresponding to the memory dump passed in heapDump parameter
Throws:
FileNotFoundException - if heapDump file does not exist
IOException - if I/O error occurred while accessing heapDump file

canBeMemMapped

public static boolean canBeMemMapped(File heapDump)


Copyright © 2018. All Rights Reserved.