Have hazelcast predicate return sorted collection

2019-09-19 02:21发布

is there a way to get a sorted collection from a hazelcast predicate? i have found that hazelcast offers a pagingpredicate for this purpose but i am not interested in the paging behavior (at least for now).

even if one does use this pagingpredicate, does it make sure that the whole collection is sorted and not just the items in a particular page? and also if there is any way to disable the paging completely?

i am interested in getting the results in sorted form and not in sorting the distributed data structure.

thank you

1条回答
男人必须洒脱
2楼-- · 2019-09-19 02:44

i ran a few tests with pagingpredicate and it did exactly what i wanted.

pagesize should be selected carefully. small page size with big data can cause huge number of comparisons with lots of data travel between hazelcast nodes.

at the end, all the items in the resulting collection are perfectly sorted, including the ones in any given page of course.

hope someone will find it useful.

查看更多
登录 后发表回答