com.streamsets.systemexplorer.api.ExplorerLoader Maven / Gradle / Ivy
The newest version!
/*
* Copyright contributors to the StreamSets project
* StreamSets Inc., an IBM Company 2024
*
* 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.streamsets.systemexplorer.api;
import com.streamsets.pipeline.api.ConfigIssue;
import java.util.Collections;
import java.util.List;
/**
* Loads explorer data to be used for Explorer searches. The loaded data is cached by the engine.
*/
public interface ExplorerLoader {
/**
* Returns an empty data set. This method is called to get an 'empty' explorer data instance to be given to
* the load method.
*/
ExplorerData getEmptyData();
/**
* Initializes the loader using the stage configuration. Invoked before every load.
*/
default List init(final ExplorerRequestContext explorerRequestContext) {
return Collections.emptyList();
}
/**
* Loads explorer data constrained by boundaries or unbounded explorer data if boundaries is
* {@link ExplorerDataBoundaries#NONE}
*
* The method replaces parts of the explorer data that were loaded before.
*
* @param explorerData - data storage where to load the new data to.
* @param explorerDataBoundaries - defines the boundaries of the explorer data where the new data will be loaded to.
* @throws InterruptedException - if the loader was interrupted while loading the data.
*/
void load(ExplorerData explorerData, ExplorerDataBoundaries explorerDataBoundaries) throws InterruptedException, ExplorerLoaderException;
/**
* Destroy the loader. Invoked after every load.
*/
default void destroy() {
}
final class NoOp implements ExplorerLoader © 2015 - 2025 Weber Informatics LLC | Privacy Policy