public boolean isConnected() {
        return isConnected.get();
    }
Called at the end to clean all the resources consumed
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/Sink.java