class IterationSegmentStages extends SegmentStages {

    @StageRef
    VanillaChronicleHashHolder<?> hh;
    @StageRef
    HashSegmentIteration it;
    @StageRef
    HashLookupSearch hls;

    /**
     * During iteration, nextTier() is called in doReplaceValue() -> relocation() -> alloc().
     * When the entry is relocated to the next tier, an entry should be inserted into hash
     * lookup. To insert an entry into hashLookup, should 1) locate empty slot, see {@link
     * KeySearch#initKeySearch()}, and 2) know the part of the hash code to insert, we know
     * it during iteration
     */
    @Override
    public void nextTier() {
        super.nextTier();
        if (it.hashLookupEntryInit())
            hls.initSearchKey(hh.h().hashLookup.key(it.hashLookupEntry));
    }

    public void initSegmentTier_WithBaseAddr(int tier, long tierBaseAddr, long tierIndex) {
        this.tier = tier;
        this.tierIndex = tierIndex;
        this.tierBaseAddr = tierBaseAddr;
    }

    @Override
    public void checkNestedContextsQueryDifferentKeys(
            LocksInterface innermostContextOnThisSegment) {<FILL_FUNCTION_BODY>}
}

        // this check is relevant only for query contexts
    
<methods>public non-sealed void <init>() ,public long allocReturnCode(int) ,public int changeAndGetLatestSameThreadSegmentModCount(int) ,public int changeAndGetTotalReadLockCount(int) ,public int changeAndGetTotalUpdateLockCount(int) ,public int changeAndGetTotalWriteLockCount(int) ,public void checkIterationContextNotLockedInThisThread() ,public void checkNestedContextsQueryDifferentKeys(net.openhft.chronicle.hash.impl.stage.entry.LocksInterface) ,public java.lang.RuntimeException debugContextsAndLocks(net.openhft.chronicle.hash.locks.InterProcessDeadLockException) ,public java.lang.String debugLocksState() ,public int decrementRead() ,public int decrementUpdate() ,public int decrementWrite() ,public void free(long, int) ,public void freeExtra(long, int, int) ,public void goToFirstTier() ,public void goToLastTier() ,public boolean hasNextTier() ,public void incrementModCount() ,public void incrementRead() ,public void incrementUpdate() ,public void incrementWrite() ,public void initSegmentIndex(int) ,public void initSegmentTier() ,public void initSegmentTier(int, long) ,public void initSegmentTier(int, long, long) ,public abstract boolean locksInit() ,public long lowestPossiblyFreeChunk() ,public void lowestPossiblyFreeChunk(long) ,public void nextTier() ,public long nextTierIndex() ,public void nextTierIndex(long) ,public void prevTier() ,public long prevTierIndex() ,public void prevTierIndex(long) ,public net.openhft.chronicle.hash.locks.InterProcessLock readLock() ,public void readUnlockAndDecrementCount() ,public boolean readZero() ,public boolean realloc(long, int, int) ,public Bytes#RAW segmentBytesForRead() ,public Bytes#RAW segmentBytesForWrite() ,public abstract boolean segmentIndexInit() ,public abstract boolean segmentTierInit() ,public void setLocalLockState(net.openhft.chronicle.hash.impl.LocalLockState) ,public void setNestedContextsLockedOnSameSegment(boolean) ,public void setNextNode(net.openhft.chronicle.hash.impl.stage.entry.LocksInterface) ,public long size() ,public long tierCountersAreaAddr() ,public long tierDeleted() ,public void tierDeleted(long) ,public long tierEntries() ,public void tierEntries(long) ,public net.openhft.chronicle.hash.locks.InterProcessLock updateLock() ,public boolean updateZero() ,public void verifyTierCountersAreaData() ,public net.openhft.chronicle.hash.locks.InterProcessLock writeLock() ,public boolean writeZero() <variables>net.openhft.chronicle.hash.impl.stage.hash.Chaining chaining,public net.openhft.chronicle.hash.impl.stage.hash.CheckOnEachPublicOperation checkOnEachPublicOperation,public int contextModCount,public long entrySpaceOffset,public final net.openhft.chronicle.algo.bitset.ReusableBitSet freeList,public VanillaChronicleHashHolder<?> hh,public net.openhft.chronicle.hash.impl.stage.entry.ReadLock innerReadLock,public net.openhft.chronicle.hash.impl.stage.entry.UpdateLock innerUpdateLock,public net.openhft.chronicle.hash.impl.stage.entry.WriteLock innerWriteLock,public int latestSameThreadSegmentModCount,net.openhft.chronicle.hash.impl.LocalLockState localLockState,public boolean nestedContextsLockedOnSameSegment,net.openhft.chronicle.hash.impl.stage.entry.LocksInterface nextNode,public net.openhft.chronicle.hash.impl.stage.entry.LocksInterface rootContextLockedOnThisSegment,public final net.openhft.chronicle.bytes.PointerBytesStore segmentBS,public final Bytes#RAW segmentBytes,public net.openhft.chronicle.hash.impl.SegmentHeader segmentHeader,public long segmentHeaderAddress,public int segmentIndex,public int tier,public long tierBaseAddr,public long tierIndex,int totalReadLockCount,int totalUpdateLockCount,int totalWriteLockCount