class PendingEntriesTree extends BPlusTree<PendingRow, PendingRow> {
    /** */
    public static final Object WITHOUT_KEY = new Object();

    /** */
    private final CacheGroupContext grp;

    /**
     * @param grp Cache group.
     * @param name Tree name.
     * @param pageMem Page memory.
     * @param metaPageId Meta page ID.
     * @param reuseList Reuse list.
     * @param initNew Initialize new index.
     * @param pageLockTrackerManager Page lock tracker manager.
     * @param pageFlag Default flag value for allocated pages.
     * @throws IgniteCheckedException If failed.
     */
    public PendingEntriesTree(
        CacheGroupContext grp,
        String name,
        PageMemory pageMem,
        long metaPageId,
        ReuseList reuseList,
        boolean initNew,
        PageLockTrackerManager pageLockTrackerManager,
        byte pageFlag
    ) throws IgniteCheckedException {
        super(
            name,
            grp.groupId(),
            grp.name(),
            pageMem,
            grp.dataRegion().config().isPersistenceEnabled() ? grp.shared().wal() : null,
            grp.offheap().globalRemoveId(),
            metaPageId,
            reuseList,
            grp.sharedGroup() ? CacheIdAwarePendingEntryInnerIO.VERSIONS : PendingEntryInnerIO.VERSIONS,
            grp.sharedGroup() ? CacheIdAwarePendingEntryLeafIO.VERSIONS : PendingEntryLeafIO.VERSIONS,
            pageFlag,
            grp.shared().kernalContext().failure(),
            pageLockTrackerManager
        );

        this.grp = grp;

        assert !grp.dataRegion().config().isPersistenceEnabled() || grp.shared().database().checkpointLockIsHeldByThread();

        initTree(initNew);
    }

    /** {@inheritDoc} */
    @Override protected int compare(BPlusIO<PendingRow> iox, long pageAddr, int idx, PendingRow row) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public PendingRow getRow(BPlusIO<PendingRow> io, long pageAddr, int idx, Object flag)
        throws IgniteCheckedException {
        PendingRow row = io.getLookupRow(this, pageAddr, idx);

        return flag == WITHOUT_KEY ? row : row.initKey(grp);
    }
}

        PendingRowIO io = (PendingRowIO)iox;

        int cmp;

        if (grp.sharedGroup()) {
            assert row.cacheId != CU.UNDEFINED_CACHE_ID : "Cache ID is not provided!";
            assert io.getCacheId(pageAddr, idx) != CU.UNDEFINED_CACHE_ID : "Cache ID is not stored!";

            cmp = Integer.compare(io.getCacheId(pageAddr, idx), row.cacheId);

            if (cmp != 0)
                return cmp;

            if (row.expireTime == 0 && row.link == 0) {
                // A search row with a cache ID only is used as a cache bound.
                // The found position will be shifted until the exact cache bound is found;
                // See for details:
                // o.a.i.i.p.c.database.tree.BPlusTree.ForwardCursor.findLowerBound()
                // o.a.i.i.p.c.database.tree.BPlusTree.ForwardCursor.findUpperBound()
                return cmp;
            }
        }

        long expireTime = io.getExpireTime(pageAddr, idx);

        cmp = Long.compare(expireTime, row.expireTime);

        if (cmp != 0)
            return cmp;

        if (row.link == 0L)
            return 0;

        long link = io.getLink(pageAddr, idx);

        return Long.compare(link, row.link);
    
<methods>public final long destroy() throws org.apache.ignite.IgniteCheckedException,public final long destroy(IgniteInClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow>, boolean) throws org.apache.ignite.IgniteCheckedException,public boolean destroyed() ,public void enableSequentialWriteMode() ,public final GridCursor<org.apache.ignite.internal.processors.cache.tree.PendingRow> find(org.apache.ignite.internal.processors.cache.tree.PendingRow, org.apache.ignite.internal.processors.cache.tree.PendingRow) throws org.apache.ignite.IgniteCheckedException,public final GridCursor<org.apache.ignite.internal.processors.cache.tree.PendingRow> find(org.apache.ignite.internal.processors.cache.tree.PendingRow, org.apache.ignite.internal.processors.cache.tree.PendingRow, java.lang.Object) throws org.apache.ignite.IgniteCheckedException,public GridCursor<org.apache.ignite.internal.processors.cache.tree.PendingRow> find(org.apache.ignite.internal.processors.cache.tree.PendingRow, org.apache.ignite.internal.processors.cache.tree.PendingRow, TreeRowClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>, java.lang.Object) throws org.apache.ignite.IgniteCheckedException,public GridCursor<org.apache.ignite.internal.processors.cache.tree.PendingRow> find(org.apache.ignite.internal.processors.cache.tree.PendingRow, org.apache.ignite.internal.processors.cache.tree.PendingRow, boolean, boolean, TreeRowClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>, TreeRowFactory<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>, java.lang.Object) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.processors.cache.tree.PendingRow findFirst() throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.processors.cache.tree.PendingRow findFirst(TreeRowClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.processors.cache.tree.PendingRow findLast() throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.processors.cache.tree.PendingRow findLast(TreeRowClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>) throws org.apache.ignite.IgniteCheckedException,public final R findOne(org.apache.ignite.internal.processors.cache.tree.PendingRow, java.lang.Object) throws org.apache.ignite.IgniteCheckedException,public final R findOne(org.apache.ignite.internal.processors.cache.tree.PendingRow, TreeRowClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>, java.lang.Object) throws org.apache.ignite.IgniteCheckedException,public final org.apache.ignite.internal.processors.cache.tree.PendingRow findOne(org.apache.ignite.internal.processors.cache.tree.PendingRow) throws org.apache.ignite.IgniteCheckedException,public long getMetaPageId() ,public final org.apache.ignite.internal.processors.cache.tree.PendingRow getRow(BPlusIO<org.apache.ignite.internal.processors.cache.tree.PendingRow>, long, int) throws org.apache.ignite.IgniteCheckedException,public abstract org.apache.ignite.internal.processors.cache.tree.PendingRow getRow(BPlusIO<org.apache.ignite.internal.processors.cache.tree.PendingRow>, long, int, java.lang.Object) throws org.apache.ignite.IgniteCheckedException,public static void interruptAll() ,public void invoke(org.apache.ignite.internal.processors.cache.tree.PendingRow, java.lang.Object, InvokeClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow>) throws org.apache.ignite.IgniteCheckedException,public final boolean isEmpty() throws org.apache.ignite.IgniteCheckedException,public void iterate(org.apache.ignite.internal.processors.cache.tree.PendingRow, org.apache.ignite.internal.processors.cache.tree.PendingRow, TreeRowClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>) throws org.apache.ignite.IgniteCheckedException,public final BPlusInnerIO<org.apache.ignite.internal.processors.cache.tree.PendingRow> latestInnerIO() ,public final BPlusLeafIO<org.apache.ignite.internal.processors.cache.tree.PendingRow> latestLeafIO() ,public boolean markDestroyed() ,public final java.lang.String printTree() throws org.apache.ignite.IgniteCheckedException,public final org.apache.ignite.internal.processors.cache.tree.PendingRow put(org.apache.ignite.internal.processors.cache.tree.PendingRow) throws org.apache.ignite.IgniteCheckedException,public boolean putx(org.apache.ignite.internal.processors.cache.tree.PendingRow) throws org.apache.ignite.IgniteCheckedException,public final org.apache.ignite.internal.processors.cache.tree.PendingRow remove(org.apache.ignite.internal.processors.cache.tree.PendingRow) throws org.apache.ignite.IgniteCheckedException,public List<org.apache.ignite.internal.processors.cache.tree.PendingRow> remove(org.apache.ignite.internal.processors.cache.tree.PendingRow, org.apache.ignite.internal.processors.cache.tree.PendingRow, int) throws org.apache.ignite.IgniteCheckedException,public final boolean removex(org.apache.ignite.internal.processors.cache.tree.PendingRow) throws org.apache.ignite.IgniteCheckedException,public final int rootLevel() throws org.apache.ignite.IgniteCheckedException,public void setIos(IOVersions<? extends BPlusInnerIO<org.apache.ignite.internal.processors.cache.tree.PendingRow>>, IOVersions<? extends BPlusLeafIO<org.apache.ignite.internal.processors.cache.tree.PendingRow>>) ,public final long size() throws org.apache.ignite.IgniteCheckedException,public long size(TreeRowClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>) throws org.apache.ignite.IgniteCheckedException,public java.lang.String toString() ,public static java.lang.String treeName(java.lang.String, java.lang.String) ,public final void validateTree() throws org.apache.ignite.IgniteCheckedException,public void visit(org.apache.ignite.internal.processors.cache.tree.PendingRow, org.apache.ignite.internal.processors.cache.tree.PendingRow, TreeVisitorClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow,org.apache.ignite.internal.processors.cache.tree.PendingRow>) throws org.apache.ignite.IgniteCheckedException<variables>public static final java.lang.String CONC_DESTROY_MSG,private static final java.lang.Object[] EMPTY,public static final int IGNITE_BPLUS_TREE_LOCK_RETRIES_DEFAULT,private static final int LOCK_RETRIES,private final PageHandler<java.lang.Long,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Bool> addRoot,private final non-sealed PageHandler<Get,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> askNeighbor,private boolean canGetRowFromInner,private final PageHandler<java.lang.Void,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Bool> cutRoot,private final java.util.concurrent.atomic.AtomicBoolean destroyed,private final non-sealed org.apache.ignite.internal.processors.failure.FailureProcessor failureProcessor,private final non-sealed java.util.concurrent.atomic.AtomicLong globalRmvId,private final PageHandler<java.lang.Long,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Bool> initRoot,private IOVersions<? extends BPlusInnerIO<org.apache.ignite.internal.processors.cache.tree.PendingRow>> innerIos,private final non-sealed PageHandler<Put,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> insert,private static volatile boolean interrupted,private IOVersions<? extends BPlusLeafIO<org.apache.ignite.internal.processors.cache.tree.PendingRow>> leafIos,private final non-sealed PageHandler<Remove,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> lockBackAndRmvFromLeaf,private final non-sealed PageHandler<Remove,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> lockBackAndTail,private final non-sealed PageHandler<Remove,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> lockTail,private final non-sealed PageHandler<Update,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> lockTailExact,private final non-sealed PageHandler<Remove,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> lockTailForward,private final non-sealed float maxFill,protected final non-sealed long metaPageId,private final non-sealed float minFill,private final non-sealed PageHandler<Put,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> replace,private final non-sealed PageHandler<Remove,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> rmvFromLeaf,private final non-sealed PageHandler<Remove,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> rmvRangeFromLeaf,private final non-sealed PageHandler<Get,org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> search,private boolean sequentialWriteOptsEnabled,public static final ThreadLocal<java.lang.Boolean> suspendFailureDiagnostic,public static PageHandlerWrapper<org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Result> testHndWrapper,private volatile org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.TreeMetaData treeMeta,private final GridTreePrinter<java.lang.Long> treePrinter