use of com.facebook.buck.event.EventKey in project buck by facebook.
the class AbstractConsoleEventBusListener method parseStarted.
@Subscribe
public void parseStarted(ParseEvent.Started started) {
parseStarted.add(started);
EventKey eventKey = started.getEventKey();
if (!buckFilesProcessing.containsKey(eventKey)) {
buckFilesProcessing.put(eventKey, EventPair.builder().setStart(started).build());
} else {
EventPair pair = buckFilesProcessing.get(eventKey);
buckFilesProcessing.put(eventKey, pair.withStart(started));
}
}
use of com.facebook.buck.event.EventKey in project buck by facebook.
the class AbstractConsoleEventBusListener method parseFinished.
@Subscribe
public void parseFinished(ParseEvent.Finished finished) {
parseFinished.add(finished);
if (progressEstimator.isPresent()) {
progressEstimator.get().didFinishParsing();
}
EventKey eventKey = finished.getEventKey();
if (!buckFilesProcessing.containsKey(eventKey)) {
buckFilesProcessing.put(eventKey, EventPair.builder().setFinish(finished).build());
} else {
EventPair pair = buckFilesProcessing.get(eventKey);
buckFilesProcessing.put(eventKey, pair.withFinish(finished));
}
}
use of com.facebook.buck.event.EventKey in project buck by facebook.
the class JavacEventSinkToBuckEventBusBridge method reportAnnotationProcessingEventFinished.
@Override
public void reportAnnotationProcessingEventFinished(BuildTarget buildTarget, String annotationProcessorName, String operationAsString, int round, boolean isLastRound) {
EventKey startedEventKey = startedAnnotationProcessingEvents.get(getKeyForAnnotationProcessingEvent(buildTarget, annotationProcessorName, operationAsString, round, isLastRound));
AnnotationProcessingEvent.Finished finished = new AnnotationProcessingEvent.Finished(Preconditions.checkNotNull(startedEventKey), buildTarget, annotationProcessorName, AnnotationProcessingEvent.Operation.valueOf(operationAsString), round, isLastRound);
eventBus.post(finished);
}
use of com.facebook.buck.event.EventKey in project buck by facebook.
the class AbstractConsoleEventBusListener method actionGraphStarted.
@Subscribe
public void actionGraphStarted(ActionGraphEvent.Started started) {
actionGraphStarted.add(started);
EventKey eventKey = started.getEventKey();
if (!buckFilesProcessing.containsKey(eventKey)) {
buckFilesProcessing.put(eventKey, EventPair.builder().setStart(started).build());
} else {
EventPair pair = buckFilesProcessing.get(eventKey);
buckFilesProcessing.put(eventKey, pair.withStart(started));
}
}
use of com.facebook.buck.event.EventKey in project buck by facebook.
the class AbstractConsoleEventBusListener method actionGraphFinished.
@Subscribe
public void actionGraphFinished(ActionGraphEvent.Finished finished) {
actionGraphFinished.add(finished);
EventKey eventKey = finished.getEventKey();
if (!buckFilesProcessing.containsKey(eventKey)) {
buckFilesProcessing.put(eventKey, EventPair.builder().setFinish(finished).build());
} else {
EventPair pair = buckFilesProcessing.get(eventKey);
buckFilesProcessing.put(eventKey, pair.withFinish(finished));
}
}