com.jrockit.mc.flightrecorder.spi
Interface IEvent

All Superinterfaces:
ITimeRange

public interface IEvent
extends ITimeRange

Interface for an event. An event consists of a start and end time, and a set values.

Author:
Erik Gahlin

Field Summary
 
Fields inherited from interface com.jrockit.mc.flightrecorder.spi.ITimeRange
INFINITE_DURATION, INFINITE_RANGE, NEGATIVE_INFINITY, POSITIVE_INFINITY
 
Method Summary
 int getBitField()
          Return a bit field associated with the event.
 IEventType getEventType()
          Returns the event type that holds meta data about the event.
 java.lang.Object getValue(java.lang.String identifier)
           This is a convenience method for returning the event value for the event.
 void setBitField(int bitField)
          Sets the bit field for the event.
 
Methods inherited from interface com.jrockit.mc.flightrecorder.spi.ITimeRange
getDuration, getEndTimestamp, getStartTimestamp
 

Method Detail

getEventType

IEventType getEventType()
Returns the event type that holds meta data about the event.

Returns:
the event type

getValue

java.lang.Object getValue(java.lang.String identifier)

This is a convenience method for returning the event value for the event.

A more efficient access pattern is to look up the IField in the IEventType and then extract the value using the field.

E.g.

  IEventType myType = ....
  IField myField = myType.getField(identifier);
  Iterator iterator = ...
  while(iterator.hasNext())
  {
    System.out.println(myField.get(iterator.next());
  }
 

Parameters:
identifier - the field identifier
Returns:
the object for the identifier or null if not available

getBitField

int getBitField()
Return a bit field associated with the event. The bit field can be used to tag events or hold reference to user dara. By default the bit field is 0.

Returns:
the bit field

setBitField

void setBitField(int bitField)
Sets the bit field for the event.

Parameters:
bitField - the bit field.


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.