public class Event extends Object implements Serializable
IBigdataClient and self-reported
 periodically to the ILoadBalancerService. The event is assigned a
 UUID when it is created and the ILoadBalancerService assigned
 start and end event times based on its local clock as the events are received
 (this helps to reduce the demand on the ITransactionService for
 global timestamp).| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | completetrueiff the event event has been generated. | 
| protected Map<String,Object> | detailsEvent details. | 
| protected long | endTimeThe event end time. | 
| UUID | eventUUIDUnique event identifier. | 
| protected IBigdataFederation | fed | 
| String | hostnameThe host on which the event was generated. | 
| protected static org.apache.log4j.Logger | log | 
| Object | majorEventTypeMajor event type (classification or category). | 
| Object | minorEventTypeMinor event type (classification or category). | 
| protected long | receiptTimeThe time when the event was received. | 
| EventResource | resourceThe resource for which the event is reported (store file, index name,
 etc). | 
| Class | serviceIfaceThe most interesting class or interface for the service which generated
 that event. | 
| String | serviceNameThe name of the service which generated the event. | 
| UUID | serviceUUIDThe  UUIDfor the service which generated that event. | 
| protected long | startTimeThe event start time. | 
| Modifier | Constructor and Description | 
|---|---|
|   | Event(IBigdataFederation fed,
     EventResource resource,
     Object majorEventType) | 
|   | Event(IBigdataFederation fed,
     EventResource resource,
     Object majorEventType,
     Map<String,Object> details)Event ctor. | 
| protected  | Event(IBigdataFederation fed,
     EventResource resource,
     Object majorEventType,
     Object minorEventType,
     Map<String,Object> details)Sub-event ctor. | 
| protected  | Event(String s)Construct an event from the tab-delimited serialization produced from
  toString(). | 
| Modifier and Type | Method and Description | 
|---|---|
| Event | addDetail(String name,
         Object value)Add a detail. | 
| Event | addDetails(Map<String,Object> details)Add details. | 
| Event | end()Sends the end event. | 
| static Event | fromString(String s)Reconstruct an event object from a string. | 
| Map<String,Object> | getDetails()Event details. | 
| long | getElapsed()The elapsed time for the event. | 
| long | getEndTime() | 
| static String | getHeader()A header that can be used to interpret the output of  toString()(with newline). | 
| long | getStartTime() | 
| boolean | isComplete()trueiff the event event has been generated. | 
| protected static Map<String,Object> | newDetails()Factory for the details hash map. | 
| Event | newSubEvent(Object minorEventType)A child event (major type is the type of the parent). | 
| Event | newSubEvent(Object minorEventType,
           Map<String,Object> details)A child event (major type is the type of the parent). | 
| protected void | sendEvent()Dispatch the  EventviaAbstractFederation.sendEvent(Event). | 
| Event | start()Send the start event. | 
| String | toString()Tab-delimited format (with newline). | 
protected static final transient org.apache.log4j.Logger log
protected transient IBigdataFederation fed
public final UUID eventUUID
public final String hostname
public final Class serviceIface
public final String serviceName
public final EventResource resource
serviceUUID will also be reported.public final Object majorEventType
public final Object minorEventType
protected long startTime
protected long endTime
protected transient long receiptTime
protected boolean complete
true iff the event event has been generated.public Event(IBigdataFederation fed, EventResource resource, Object majorEventType)
public Event(IBigdataFederation fed, EventResource resource, Object majorEventType, Map<String,Object> details)
fed - The federation object (used to send the event to an
            aggregator).resource - The resource for which the event was generated (store, index
            partition, etc).majorEventType - The major type of the event (use of enums is encouraged).details - Optional details for the event.protected Event(IBigdataFederation fed, EventResource resource, Object majorEventType, Object minorEventType, Map<String,Object> details)
fed - The federation object (used to send the event to an
            aggregator).resource - The resource for which the event was generated (store, index
            partition, etc).majorEventType - The major type of the event (use of enums is encouraged).minorEventType - The minor type of the event (use of enums is encouraged).details - Optional details for the event.protected Event(String s) throws ClassNotFoundException
toString().s - the tab delimited serializationClassNotFoundException - if any fields specify an invalid classnamepublic Event addDetails(Map<String,Object> details)
details - Event.protected static Map<String,Object> newDetails()
end() which would
 otherwise lead to a ConcurrentModificationException. It can not
 be a ConcurrentHashMap since that class does not support
 null values.public Event addDetail(String name, Object value)
name - value - Event.public boolean isComplete()
true iff the event event has been generated.public long getStartTime()
public long getEndTime()
public long getElapsed()
public Event newSubEvent(Object minorEventType)
minorEventType - public Event newSubEvent(Object minorEventType, Map<String,Object> details)
minorEventType - details - Optional ordered (name,value) array.public Event start()
public Event end()
Note: You can use this method for "instantaneous" events.
protected void sendEvent()
                  throws IOException
Event via
 AbstractFederation.sendEvent(Event).IOExceptionpublic static String getHeader()
toString()
 (with newline).public String toString()
name=value, so only the non-null columns are written out.public static Event fromString(String s) throws ClassNotFoundException
s - the tab-delimited format create by toString().ClassNotFoundException - if any CSV fields specify an invalid classnameCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.