Search in sources :

Example 1 with EventKey

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));
    }
}
Also used : EventKey(com.facebook.buck.event.EventKey) Subscribe(com.google.common.eventbus.Subscribe)

Example 2 with EventKey

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));
    }
}
Also used : EventKey(com.facebook.buck.event.EventKey) Subscribe(com.google.common.eventbus.Subscribe)

Example 3 with EventKey

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);
}
Also used : EventKey(com.facebook.buck.event.EventKey)

Example 4 with EventKey

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));
    }
}
Also used : EventKey(com.facebook.buck.event.EventKey) Subscribe(com.google.common.eventbus.Subscribe)

Example 5 with EventKey

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));
    }
}
Also used : EventKey(com.facebook.buck.event.EventKey) Subscribe(com.google.common.eventbus.Subscribe)

Aggregations

EventKey (com.facebook.buck.event.EventKey)5 Subscribe (com.google.common.eventbus.Subscribe)4