aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/LoadingPhaseStartedEvent.java
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-04-07 12:14:28 +0000
committerGravatar Lukacs Berki <lberki@google.com>2016-04-07 13:12:10 +0000
commit5097a1bcf7648aa63a61c943be6212a42594be39 (patch)
tree9456de4292091cb82503c1b8038783cbd14452d2 /src/main/java/com/google/devtools/build/lib/skyframe/LoadingPhaseStartedEvent.java
parentc58bc16485b0043e1ec42decfa2790219e1cd007 (diff)
SkyframeExecutor: Raise an event at the beginning of the loading phase
The main purpose of this event is to provide the LoadingProgressReceiver to any interested listener. Note that this event will only be raised if the option --experimental_skyframe_target_pattern_evaluator is given. -- Change-Id: Ic675c9e1255b7d60de28bdad1ec1838655abd389 Reviewed-on: https://bazel-review.googlesource.com/#/c/3269 MOS_MIGRATED_REVID=119258070
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/LoadingPhaseStartedEvent.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/LoadingPhaseStartedEvent.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/LoadingPhaseStartedEvent.java b/src/main/java/com/google/devtools/build/lib/skyframe/LoadingPhaseStartedEvent.java
new file mode 100644
index 0000000000..f62c91b0dc
--- /dev/null
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/LoadingPhaseStartedEvent.java
@@ -0,0 +1,35 @@
+// Copyright 2016 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.devtools.build.lib.skyframe;
+
+/**
+ * This event is fired at the beginning of the loading phase.
+ */
+public final class LoadingPhaseStartedEvent {
+
+ final LoadingProgressReceiver loadingProgressReceiver;
+
+ /**
+ * Construct the event
+ *
+ * @param loadingProgressReceiver a receiver that gets updated about the progress of loading
+ */
+ public LoadingPhaseStartedEvent(LoadingProgressReceiver loadingProgressReceiver) {
+ this.loadingProgressReceiver = loadingProgressReceiver;
+ }
+
+ public LoadingProgressReceiver getLoadingProgressReceiver() {
+ return loadingProgressReceiver;
+ }
+}