@Override
    public List<String> getUniqueStreamIds() {

        List<String> uniqueStreams = new ArrayList<String>();
        for (String aStreamId : streamIdList) {
            if (!uniqueStreams.contains(aStreamId)) {
                uniqueStreams.add(aStreamId);
            }
        }
        return uniqueStreams;
    }
Input stream that handle states in query
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/execution/query/input/stream/StateInputStream.java