Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk
Class GarbageCollector

    java.lang.Object
      com.sun.squawk.GarbageCollector

All Implemented Interfaces:
  GlobalStaticFields

Direct Known Subclasses:
  CheneyCollector, Lisp2Collector, Lisp2GenerationalCollector

    public abstract class GarbageCollector

extends Object
implements GlobalStaticFields

Base class for all garbage collectors.

Field Summary
`static boolean` | `NATIVE_GC_ONLY` If build.properties defines NATIVE_GC_ONLY= true, then define constant NATIVE_GC_ONLY = true.
`protected long` | `numBytesLastScanned` The number of bytes scanned in the last collection.
`protected Ref` | `references` List of weak references.

Method Summary
`int` | `getBytesAllocatedSinceLastGC()` Get the number of bytes allocated since the last GC.
`long` | `getBytesAllocatedTotal()` Get the number of bytes allocated since JVM startup.
`long` | `getBytesFreedTotal()` Get the number of bytes freed in all collections
`long` | `getBytesLastFreed()` Get the number of bytes freed in the last collection
`long` | `getBytesLastScanned()` Get the number of bytes scanned in the last collection.
`long` | `getLastGCTime()` Gets the time taken by the last collection.
`long` | `getMaxFullGCTime()` Gets the time of the longest full GC.
`long` | `getMaxGCTime()` Get the time taken by the slowest garbage collection.
`long` | `getMaxPartialGCTime()` Gets the time of the longest partial GC.
`long` | `getTotalFullGCTime()` Gets the time taken by all full garbage collections.
`long` | `getTotalGCTime()` Gets the time taken by all GC.
`long` | `getTotalPartialGCTime()` Get the time taken by all partial garbage collections.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NATIVE_GC_ONLY

    public static final boolean NATIVE_GC_ONLY

  If build.properties defines NATIVE_GC_ONLY= true, then define constant NATIVE_GC_ONLY = true.

  See Also:
    Constant Field Values

### numBytesLastScanned

    protected long numBytesLastScanned

  The number of bytes scanned in the last collection.

### references

    protected Ref references

  List of weak references.

Method Detail

### getLastGCTime

    public final long getLastGCTime()

  Gets the time taken by the last collection.

  Returns:
    ms

### getMaxFullGCTime

    public final long getMaxFullGCTime()

  Gets the time of the longest full GC.

  Returns:
    ms

### getMaxPartialGCTime

    public final long getMaxPartialGCTime()

  Gets the time of the longest partial GC.

  Returns:
    ms

### getMaxGCTime

    public final long getMaxGCTime()

  Get the time taken by the slowest garbage collection.

  Returns:
    ms

### getTotalGCTime

    public final long getTotalGCTime()

  Gets the time taken by all GC.

  Returns:
    ms

### getTotalFullGCTime

    public final long getTotalFullGCTime()

  Gets the time taken by all full garbage collections.

  Returns:
    ms

### getTotalPartialGCTime

    public final long getTotalPartialGCTime()

  Get the time taken by all partial garbage collections.

  Returns:
    ms

### getBytesLastFreed

    public final long getBytesLastFreed()

  Get the number of bytes freed in the last collection

  Returns:
    bytes

### getBytesLastScanned

    public final long getBytesLastScanned()

  Get the number of bytes scanned in the last collection. This is a measure of how much "work" the collector did in the last GC. It measures the size of the heap that was last collected. With generational colelctors this may be much less than the size of the used heap. It can also be used to compute "bytes surviving collection" = getBytesLastScanned() - getBytesLastFreed().

  Returns:
    the number of bytes scanned in the last collection.

### getBytesFreedTotal

    public final long getBytesFreedTotal()

  Get the number of bytes freed in all collections

  Returns:
    bytes

### getBytesAllocatedSinceLastGC

    public int getBytesAllocatedSinceLastGC()

  Get the number of bytes allocated since the last GC. May be inaccurate during a copyObjectGraph operation.

  Returns:
    bytes

### getBytesAllocatedTotal

    public long getBytesAllocatedTotal()

  Get the number of bytes allocated since JVM startup. Watch out for overflow.

  Returns:
    bytes

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"