Examples of regionEqual()


Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

            // Check last.
            int lastIdx = ranges.size() - 1;

            GridGgfsFileAffinityRange last = ranges.get(lastIdx);

            if (last.regionEqual(range)) {
                assert last.status() == RANGE_STATUS_MOVED;

                ranges.remove(last);

                return;
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

            // Check first.
            int firstIdx = 0;

            GridGgfsFileAffinityRange first = ranges.get(firstIdx);

            if (first.regionEqual(range)) {
                assert first.status() == RANGE_STATUS_MOVED;

                ranges.remove(first);

                return;
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

            while (lastIdx - firstIdx > 1) {
                int midIdx = (firstIdx + lastIdx) / 2;

                GridGgfsFileAffinityRange midRange = ranges.get(midIdx);

                if (midRange.regionEqual(range)) {
                    assert midRange.status() == RANGE_STATUS_MOVED;

                    ranges.remove(midIdx);

                    return;
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

        GridGgfsFileAffinityRange range = new GridGgfsFileAffinityRange(0, 9999, affKey);

        Collection<GridGgfsFileAffinityRange> split = range.split(10000);

        assertEquals(1, split.size());
        assertTrue(range.regionEqual(F.first(split)));

        split = range.split(5000);

        assertEquals(2, split.size());
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

        Iterator<GridGgfsFileAffinityRange> it = split.iterator();

        GridGgfsFileAffinityRange part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(0, 4999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(5000, 9999, affKey)));
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(0, 4999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(5000, 9999, affKey)));

        split = range.split(3000);

        assertEquals(4, split.size());
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

        it = split.iterator();

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(0, 2999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(3000, 5999, affKey)));
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(0, 2999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(3000, 5999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(6000, 8999, affKey)));
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(3000, 5999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(6000, 8999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(9000, 9999, affKey)));
    }
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileAffinityRange.regionEqual()

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(6000, 8999, affKey)));

        part = it.next();

        assertTrue(part.regionEqual(new GridGgfsFileAffinityRange(9000, 9999, affKey)));
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.