public abstract class AbstractBuckEvent extends Object implements BuckEvent
BUILD_FINISHED, BUILD_REPORT, BUILD_STARTED, BUILD_STATUS_EVENT, CACHE_RATE_STATS_UPDATE_EVENT, INDIVIDUAL_TEST_AWAITING_RESULTS, INSTALL_STARTED, PARSE_FINISHED, PARSE_STARTED, PROJECT_GENERATION_FINISHED, PROJECT_GENERATION_STARTED, TEST_RUN_STARTED
Modifier | Constructor and Description |
---|---|
protected |
AbstractBuckEvent(EventKey eventKey) |
Modifier and Type | Method and Description |
---|---|
void |
configure(long timestampMillis,
long nanoTime,
long threadUserNanoTime,
long threadId,
BuildId buildId)
Method to configure an event before posting it to the
BuckEventBus . |
boolean |
equals(Object o)
The default implementation of equals checks to see if two events are related, are on the same
thread, and are the same concrete class.
|
BuildId |
getBuildId() |
EventKey |
getEventKey() |
long |
getNanoTime() |
long |
getThreadId() |
long |
getThreadUserNanoTime() |
long |
getTimestampMillis() |
protected abstract String |
getValueString() |
int |
hashCode() |
boolean |
isConfigured() |
boolean |
isRelatedTo(BuckEvent event) |
String |
toLogMessage() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getEventName, storeLastInstanceAndReplayForNewClients
protected AbstractBuckEvent(EventKey eventKey)
public void configure(long timestampMillis, long nanoTime, long threadUserNanoTime, long threadId, BuildId buildId)
BuckEventBus
. This method should
only be invoked once per event, and only by the BuckEventBus
in production code.public boolean isConfigured()
isConfigured
in interface BuckEvent
public long getTimestampMillis()
getTimestampMillis
in interface BuckEventExternalInterface
public long getNanoTime()
getNanoTime
in interface BuckEvent
public long getThreadUserNanoTime()
getThreadUserNanoTime
in interface BuckEvent
public String toLogMessage()
toLogMessage
in interface BuckEvent
public long getThreadId()
getThreadId
in interface BuckEvent
public BuildId getBuildId()
getBuildId
in interface BuckEvent
public final EventKey getEventKey()
getEventKey
in interface BuckEvent
public final boolean isRelatedTo(BuckEvent event)
isRelatedTo
in interface BuckEvent
(CommandEvent.started("build")).isRelatedTo(CommandEvent.finished("build")) == true
(CommandEvent.started("build")).isRelatedTo(CommandEvent.started("build")) == true
(CommandEvent.started("build")).isRelatedTo(CommandEvent.finished("install")) == false
protected abstract String getValueString()
public boolean equals(Object o)