public void restore(SnapshotStateList snapshotStatelist) {
        TreeMap<Long, Snapshot> revisions = snapshotStatelist.getSnapshotStates();
        Iterator<Map.Entry<Long, Snapshot>> itr = revisions.entrySet().iterator();
        this.isOperationLogEnabled = false;
        while (itr.hasNext()) {
            Map.Entry<Long, Snapshot> snapshotEntry = itr.next();
            if (!snapshotEntry.getValue().isIncrementalSnapshot()) {
                this.deleteAll();
                IndexEventHolder snapshotEventHolder = (IndexEventHolder) snapshotEntry.getValue().getState();
                if (primaryKeyData != null) {
                    primaryKeyData.clear();
                    primaryKeyData.putAll(snapshotEventHolder.primaryKeyData);
                }
                if (indexData != null) {
                    indexData.clear();
                    indexData.putAll(snapshotEventHolder.indexData);
                }
                forceFullSnapshot = false;
            } else {
                ArrayList<Operation> operations = (ArrayList<Operation>) snapshotEntry.getValue().getState();
                for (Operation op : operations) {
                    switch (op.operation) {
                        case ADD:
                            add((StreamEvent) op.parameters);
                            break;
                        case REMOVE:
                            deleteAll((StreamEvent) op.parameters);
                            break;
                        case CLEAR:
                            deleteAll();
                            break;
                        case OVERWRITE:
                            overwrite((StreamEvent) op.parameters);
                            break;
                        case DELETE_BY_OPERATOR:
                            Object[] args = (Object[]) op.parameters;
                            delete((String) args[0], (Compare.Operator) args[1], args[2]);
                            break;
                        default:
                            continue;
                    }
                }
            }
        }
        this.isOperationLogEnabled = true;
    }
EventHolder implementation where events will be indexed and stored. This will offer faster access compared to
other EventHolder implementations. User can only add unique events based on a given primary key.
modules/siddhi-core/src/main/java/io/siddhi/core/table/holder/IndexEventHolder.java