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, waitgetEventName, storeLastInstanceAndReplayForNewClientsprotected 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 BuckEventpublic long getTimestampMillis()
getTimestampMillis in interface BuckEventExternalInterfacepublic long getNanoTime()
getNanoTime in interface BuckEventpublic long getThreadUserNanoTime()
getThreadUserNanoTime in interface BuckEventpublic String toLogMessage()
toLogMessage in interface BuckEventpublic long getThreadId()
getThreadId in interface BuckEventpublic BuildId getBuildId()
getBuildId in interface BuckEventpublic final EventKey getEventKey()
getEventKey in interface BuckEventpublic 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)