blob: b61f590ba54c6ea24cc20a8ae57ddbaa6c2bba73 [file] [log] [blame]
package org.apache.samoa.flink.topology.impl;
/*
* #%L
* SAMOA
* %%
* Copyright (C) 2014 - 2015 Apache Software Foundation
* %%
* 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.
* #L%
*/
import org.apache.flink.streaming.api.datastream.DataStream;
/**
* Common interface of FlinkEntranceProcessingItem and FlinkProcessingItem
*/
public interface FlinkComponent {
/**
* An initiation of the node. It should create the right invokables and apply the appropriate
* stream transformations
*/
public void initialise();
/**
* This check is needed in order to determine whether all requirements for a Flink Component
* (DataStream) are satisfied in order to initialise it. This is necessary in this integration
* since Flink Streaming applies eager datastream generation based on transformations.
*
* @return
*/
public boolean canBeInitialised();
/**
*
* @return
*/
public boolean isInitialised();
/**
* The wrapped Flink DataStream generated by this Flink component. Mind that the component
* should first be initialised in order to have a generated DataStream
*
* @return
*/
public DataStream<SamoaType> getOutStream();
/**
* A unique component id
*
* @return
*/
public int getComponentId();
}