final void initSinkHandler(String siddhiAppName, StreamDefinition streamDefinition,
                               SinkHandlerCallback sinkHandlerCallback,
                               SiddhiAppContext siddhiAppContext) {
        this.sinkHandlerCallback = sinkHandlerCallback;
        StateFactory<S> stateFactory = init(streamDefinition, sinkHandlerCallback);
        id = siddhiAppName + "-" + streamDefinition.getId() + "-" + this.getClass().getName();
        stateHolder = siddhiAppContext.generateStateHolder(
                streamDefinition.getId() + "-" + this.getClass().getName(),
                stateFactory);
    }
SinkHandler is an optional interface before {@link SinkMapper}.
It will do optional processing to the events before sending the events to the desired mapper

@param <S> current state for the Sink Holder
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/SinkHandler.java