IGNITE-11663 o.a.i.internal.processors.cache.persistence.wal.record.RecordTypes removed. - Fixes #7330.

Signed-off-by: Aleksei Scherbakov <ascherbakov@apache.org>
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/package-info.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/package-info.java
index 42b07b1..8e99ca0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/package-info.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/package-info.java
@@ -16,7 +16,7 @@
  */
 
 /**
- * This package contain cache with persitence implementation. <br>
+ * This package contain cache with persistence implementation. <br>
  * See also
  * <a href="https://github.com/apache/ignite/tree/master/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence">GitHub Package Readme</a>
  */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java
index 8d1445c..acea47d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/SingleSegmentLogicalRecordsIterator.java
@@ -18,7 +18,6 @@
 
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.util.Set;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.pagemem.wal.WALPointer;
@@ -29,7 +28,6 @@
 import org.apache.ignite.internal.processors.cache.persistence.wal.io.FileInput;
 import org.apache.ignite.internal.processors.cache.persistence.wal.io.SegmentIO;
 import org.apache.ignite.internal.processors.cache.persistence.wal.io.SimpleSegmentFileInputFactory;
-import org.apache.ignite.internal.processors.cache.persistence.wal.record.RecordTypes;
 import org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializer;
 import org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializerFactory;
 import org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializerFactoryImpl;
@@ -136,12 +134,10 @@
         /** Serial version uid. */
         private static final long serialVersionUID = 0L;
 
-        /** Records type to skip. */
-        private final Set<WALRecord.RecordType> skip = RecordTypes.DELTA_TYPE_SET;
 
         /** {@inheritDoc} */
         @Override public boolean apply(WALRecord.RecordType type, WALPointer ptr) {
-            return !skip.contains(type);
+            return type.purpose() == WALRecord.RecordPurpose.LOGICAL || type == WALRecord.RecordType.CHECKPOINT_RECORD;
         }
     }
 }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/record/RecordTypes.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/record/RecordTypes.java
deleted file mode 100644
index b6d20dc..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/record/RecordTypes.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.cache.persistence.wal.record;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.ignite.internal.pagemem.wal.record.WALRecord;
-
-/**
- * Utility class for handling WAL record types.
- */
-public final class RecordTypes {
-    /** */
-    public static final Set<WALRecord.RecordType> DELTA_TYPE_SET = new HashSet<>();
-
-    static {
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PAGE_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.INIT_NEW_PAGE_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.DATA_PAGE_INSERT_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.DATA_PAGE_INSERT_FRAGMENT_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.DATA_PAGE_REMOVE_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.DATA_PAGE_SET_FREE_LIST_PAGE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.MVCC_DATA_PAGE_MARK_UPDATED_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.MVCC_DATA_PAGE_TX_STATE_HINT_UPDATED_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.MVCC_DATA_PAGE_NEW_TX_STATE_HINT_UPDATED_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_META_PAGE_INIT_ROOT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_META_PAGE_ADD_ROOT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_META_PAGE_CUT_ROOT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_INIT_NEW_ROOT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_PAGE_RECYCLE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_PAGE_INSERT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_FIX_LEFTMOST_CHILD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_FIX_COUNT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_PAGE_REPLACE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_PAGE_REMOVE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_PAGE_INNER_REPLACE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_FIX_REMOVE_ID);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_FORWARD_PAGE_SPLIT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_EXISTING_PAGE_SPLIT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_PAGE_MERGE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PAGES_LIST_SET_NEXT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PAGES_LIST_SET_PREVIOUS);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PAGES_LIST_INIT_NEW_PAGE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PAGES_LIST_ADD_PAGE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PAGES_LIST_REMOVE_PAGE);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.META_PAGE_INIT);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PARTITION_META_PAGE_UPDATE_COUNTERS);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PARTITION_META_PAGE_UPDATE_COUNTERS_V2);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.TRACKING_PAGE_DELTA);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.META_PAGE_UPDATE_LAST_SUCCESSFUL_SNAPSHOT_ID);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.META_PAGE_UPDATE_LAST_SUCCESSFUL_FULL_SNAPSHOT_ID);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.META_PAGE_UPDATE_NEXT_SNAPSHOT_ID);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.META_PAGE_UPDATE_LAST_ALLOCATED_INDEX);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.PAGE_LIST_META_RESET_COUNT_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.DATA_PAGE_UPDATE_RECORD);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.BTREE_META_PAGE_INIT_ROOT2);
-        DELTA_TYPE_SET.add(WALRecord.RecordType.ROTATED_ID_PART_RECORD);
-    }
-}