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

## com.bea.jvm.event
Class GarbageCollectionEvent

    java.lang.Object
      |
      +--java.util.EventObject
            |
            +--com.bea.jvm.event.GarbageCollectionEvent

All Implemented Interfaces:
  java.io.Serializable

public class GarbageCollectionEvent
extends java.util.EventObject

Event delivered _after_ a GC is done.

Author:
  Calle Wilund, Marcus Hirt
See Also:
  Serialized Form

Field Summary
`static int` | `GC_COLLECTION_MAJOR` A major GC round was completed.
`static int` | `GC_COLLECTION_MINOR` A minor GC round was completed.

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`GarbageCollectionEvent(GarbageCollector gc, int eventType)` Constructor.
`GarbageCollectionEvent(GarbageCollector gc, int type, long start, long end)` Constructor.

Method Summary
`long` | `getEndTime()` Returns the end time of the collection.
`int` | `getEventType()` Returns the type of collection performed.
`GarbageCollector` | `getGarbageCollector()` Returns a reference to the GarbageCollector that performed the GC or switch.
`long` | `getStartTime()` Returns the start time of the collection.

Methods inherited from class java.util.EventObject
`getSource, toString`

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

Field Detail

### GC_COLLECTION_MAJOR

    public static final int GC_COLLECTION_MAJOR

  A major GC round was completed.

  See Also:
    Constant Field Values

### GC_COLLECTION_MINOR

    public static final int GC_COLLECTION_MINOR

  A minor GC round was completed.

  See Also:
    Constant Field Values

Constructor Detail

### GarbageCollectionEvent

    public GarbageCollectionEvent(GarbageCollector gc,
                                  int eventType)

  Constructor.

Parameters:
  `gc` - the source of the event.
  `eventType` - the event type. System.gc() or memory allocation).

### GarbageCollectionEvent

    public GarbageCollectionEvent(GarbageCollector gc,
                                  int type,
                                  long start,
                                  long end)

  Constructor.

Parameters:
  `gc` - the source of the event.
  `type` - the event type.
  `start` - time when GC was started.
  `end` - time when GC was completed.

Method Detail

### getEventType

    public int getEventType()

  Returns the type of collection performed.

  Returns:
    the type of collection performed.
  See Also:
    `GC_COLLECTION_MAJOR`, `GC_COLLECTION_MINOR`

### getGarbageCollector

    public GarbageCollector getGarbageCollector()

  Returns a reference to the GarbageCollector that performed the GC or switch.

  Returns:
    the GarbageCollector that perfomed the GC or strategy switch.

### getStartTime

    public long getStartTime()

  Returns the start time of the collection.

  Returns:
    the start time of the collection.

### getEndTime

    public long getEndTime()

  Returns the end time of the collection.

  Returns:
    the end time of the collection.

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