public int addData(Attribute attribute) {
        if (onAfterWindowData != null) {
            if (!onAfterWindowData.contains(attribute)) {
                onAfterWindowData.add(attribute);
                return SiddhiConstants.ON_AFTER_WINDOW_DATA_INDEX;
            }
        } else {
            if (!beforeWindowData.contains(attribute)) {
                beforeWindowData.add(attribute);
                return SiddhiConstants.BEFORE_WINDOW_DATA_INDEX;
            }
        }
        return SiddhiConstants.UNKNOWN_STATE;
    }
Universal method to add data to MetaStream event.
Will make sure event will be added to corresponding array by
initializing them accordingly.

@param attribute attribute
@return attribute position
modules/siddhi-core/src/main/java/io/siddhi/core/event/stream/MetaStreamEvent.java