File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer/configuration
opengrok-web/src/main/java/org/opengrok/web Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public final class RuntimeEnvironment {
125
125
private transient volatile Boolean ctagsFound ;
126
126
private final transient Set <String > ctagsLanguages = new HashSet <>();
127
127
128
- public WatchDogService watchDog ;
128
+ private final WatchDogService watchDog ;
129
129
130
130
private final Set <ConfigurationChangedListener > listeners = new CopyOnWriteArraySet <>();
131
131
@@ -163,6 +163,13 @@ public void setIndexer(boolean indexer) {
163
163
this .indexer = indexer ;
164
164
}
165
165
166
+ /**
167
+ * @return {@code WatchDogService} instance
168
+ */
169
+ public WatchDogService getWatchDog () {
170
+ return watchDog ;
171
+ }
172
+
166
173
/** Gets the thread pool used for multi-project searches. */
167
174
public ExecutorService getSearchExecutor () {
168
175
return lzSearchExecutor .get ();
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
101
101
102
102
String pluginDirectory = env .getPluginDirectory ();
103
103
if (pluginDirectory != null && env .isAuthorizationWatchdog ()) {
104
- env .watchDog .start (new File (pluginDirectory ));
104
+ env .getWatchDog () .start (new File (pluginDirectory ));
105
105
}
106
106
107
107
// Check index(es).
@@ -151,7 +151,7 @@ private void check_index(RuntimeEnvironment env) {
151
151
public void contextDestroyed (final ServletContextEvent servletContextEvent ) {
152
152
RuntimeEnvironment env = RuntimeEnvironment .getInstance ();
153
153
env .getIndexerParallelizer ().bounce ();
154
- env .watchDog .stop ();
154
+ env .getWatchDog () .stop ();
155
155
env .stopExpirationTimer ();
156
156
try {
157
157
env .shutdownRevisionExecutor ();
You can’t perform that action at this time.
0 commit comments