Examples of firstOrNull()


Examples of org.elasticsearch.cluster.routing.ShardIterator.firstOrNull()

        assertThat(shardRouting5, sameInstance(shardRouting1));
        assertThat(shardRouting6, sameInstance(shardRouting2));

        shardIterator = routingTable.index("test1").shard(0).shardsIt(3);
        assertThat(shardIterator.size(), equalTo(2));
        assertThat(shardIterator.firstOrNull(), notNullValue());
        assertThat(shardIterator.firstOrNull(), sameInstance(shardIterator.firstOrNull()));
        ShardRouting shardRouting7 = shardIterator.nextOrNull();
        assertThat(shardRouting7, notNullValue());
        ShardRouting shardRouting8 = shardIterator.nextOrNull();
        assertThat(shardRouting8, notNullValue());
View Full Code Here

Examples of org.elasticsearch.cluster.routing.ShardIterator.firstOrNull()

        assertThat(shardRouting6, sameInstance(shardRouting2));

        shardIterator = routingTable.index("test1").shard(0).shardsIt(3);
        assertThat(shardIterator.size(), equalTo(2));
        assertThat(shardIterator.firstOrNull(), notNullValue());
        assertThat(shardIterator.firstOrNull(), sameInstance(shardIterator.firstOrNull()));
        ShardRouting shardRouting7 = shardIterator.nextOrNull();
        assertThat(shardRouting7, notNullValue());
        ShardRouting shardRouting8 = shardIterator.nextOrNull();
        assertThat(shardRouting8, notNullValue());
        assertThat(shardRouting8, not(sameInstance(shardRouting7)));
View Full Code Here

Examples of org.elasticsearch.cluster.routing.ShardIterator.firstOrNull()

        assertThat(shardRouting6, sameInstance(shardRouting2));

        shardIterator = routingTable.index("test1").shard(0).shardsIt(3);
        assertThat(shardIterator.size(), equalTo(2));
        assertThat(shardIterator.firstOrNull(), notNullValue());
        assertThat(shardIterator.firstOrNull(), sameInstance(shardIterator.firstOrNull()));
        ShardRouting shardRouting7 = shardIterator.nextOrNull();
        assertThat(shardRouting7, notNullValue());
        ShardRouting shardRouting8 = shardIterator.nextOrNull();
        assertThat(shardRouting8, notNullValue());
        assertThat(shardRouting8, not(sameInstance(shardRouting7)));
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.