001 // Copyright 2008 Waterken Inc. under the terms of the MIT X license 002 // found at http://www.opensource.org/licenses/mit-license.html 003 package org.ref_send.log; 004 005 import java.io.Serializable; 006 007 import org.joe_e.Powerless; 008 import org.joe_e.Struct; 009 import org.ref_send.Record; 010 import org.ref_send.deserializer; 011 import org.ref_send.name; 012 013 /** 014 * Logs an event. 015 */ 016 public class 017 Event extends Struct implements Powerless, Record, Serializable { 018 static private final long serialVersionUID = 1L; 019 020 /** 021 * event identifier 022 */ 023 public final Anchor anchor; 024 025 /** 026 * difference, measured in milliseconds, between the time the event occurred 027 * and midnight, January 1, 1970 UTC (optional) 028 */ 029 public final Long timestamp; 030 031 /** 032 * trace of the call site that produced the event (optional) 033 */ 034 public final Trace trace; 035 036 /** 037 * Constructs an instance. 038 * @param anchor {@link #anchor} 039 * @param timestamp {@link #timestamp} 040 * @param trace {@link #trace} 041 */ 042 public @deserializer 043 Event(@name("anchor") final Anchor anchor, 044 @name("timestamp") final Long timestamp, 045 @name("trace") final Trace trace) { 046 this.anchor = anchor; 047 this.timestamp = timestamp; 048 this.trace = trace; 049 } 050 }