@Override
        public Map<String, Object> snapshot() {
            Map<String, Object> state = new HashMap<>();
            state.put("CountMap", countMap);
            state.put("Map", map);
            state.put("TotalCount", totalCount);
            state.put("CurrentBucketId", currentBucketId);
            return state;
        }
Inner class to keep the lossy count
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/window/LossyFrequentWindowProcessor.java