具有hazelcast谓词返回已排序的集合 [英] Have hazelcast predicate return sorted collection

查看:156
本文介绍了具有hazelcast谓词返回已排序的集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以从hazelcast谓词中获取排序的集合?我发现hazelcast为此提供了一个pagepredicate谓词,但我对分页行为不感兴趣(至少现在是这样).

即使一个人确实使用了该分页谓词,也可以确保整个集合(而不只是特定页面中的项目)都被排序了吗?以及是否有任何方法可以完全禁用分页?

我有兴趣获得排序形式的结果,而不是对分布式数据结构进行排序.

谢谢

解决方案

我用pageingpredicate进行了一些测试,它确实满足了我的要求.

pagesize应该仔细选择.小页面和大数据可能会导致大量比较,并且在hazelcast节点之间传输大量数据.

最后,对结果集中的所有项目进行了完美排序,包括课程中任何给定页面中的项目.

希望有人会发现它有用.

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

解决方案

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.

这篇关于具有hazelcast谓词返回已排序的集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆