ZSetOperations:
有序集合,默認按照score升序排列,存儲格式K(1)==V(n),V(1)=S(1)(K=key,V=value,S=score)
1.add(K,V,S):添加
2.count(K,Smin,Smax):鍵為K的集合,Smin<=score<=Smax的元素個數
3.size(K):鍵為K的集合元素個數
4.score(K,obj):鍵為K的集合,value為obj的元素分數
5.incrementScore(K,V,delta):元素分數增加,delta是增量
6.intersectAndStore(K,otherK[s],destK):K集合與otherK[s]集合,共同的交集元素存到destK(復制),返回元素個數
unionAndStore(K,otherK[s],destK):K集合與otherK[s]集合,共同的並集元素存到destK(復制),返回元素個數
7.range(K,start,end):鍵為K的集合,索引start<=index<=end的元素子集,正序
reverseRange(K,start,end):鍵為K的集合,索引start<=index<=end的元素子集,倒序
8.rangeByScore(K,Smin,Smax,[offset],[count]):鍵為K的集合,offerset和count是限制條件,從索引1開始找到count個元素=子集,從子集中找到Smin<=score<=Smax的元素集合,返回Set<V>,正序
reverseRangeByScore(K,Smin,Smax,[offset],[count]):鍵為K的集合,offerset和count是限制條件,從索引1開始找到count個元素=子集,從子集中找到Smin<=score<=Smax的元素集合,返回Set<V>,倒序
9.rangeByScoreWithScores(K,Smin,Smax,[offset],[count]):鍵為K的集合,offerset和count是限制條件,從索引1開始找到count個元素=子集,從子集中找到Smin<=score<=Smax的元素集合,返回泛型接口(包括score和value),正序
reverseRangeByScoreWithScores(K,Smin,Smax,[offset],[count]):鍵為K的集合,offerset和count是限制條件,從索引1開始找到count個元素=子集,從子集中找到Smin<=score<=Smax的元素集合,返回泛型接口(包括score和value),倒序
10.rangeWithScores(K,start,end):鍵為K的集合,索引start<=index<=end的元素子集,返回泛型接口(包括score和value),正序
reverseRangeWithScores(K,start,end):鍵為K的集合,索引start<=index<=end的元素子集,返回泛型接口(包括score和value),倒序
11.rank(K,obj):鍵為K的集合,value為obj的元素索引,正序
reverseRank(K,obj):鍵為K的集合,value為obj的元素索引,倒序
12.remove(K,obj):刪除,鍵為K的集合,value為obj的元素
13.removeRange(K,start,end):刪除,鍵為K的集合,索引start<=index<=end的元素子集
14.removeRangeByScore(K,Smin,Smax):刪除,鍵為K的集合,Smin<=score<=Smax的元素,返回刪除個數
SetOperations
無序集合,add的順序不是存儲順序
2.difference(K key, otherK[s])
:差集,返回Set
3.differenceAndStore(K key, otherKey[s], K destKey)
:存儲差集,返回Long
4.intersect(K key, otherKey[s]):交集,返回Set
5.intersectAndStore(K key, otherKey[s], K destKey)
:存儲交集,返回Long
6.isMember(K key, Java.lang.Object o)
:對象是否存在
8.move(K key, V value, K destKey)
:轉移一個元素到另一個key(剪切)
10.randomMember(K key)
:隨即元素
11.remove(K key, java.lang.Object o)
:移除元素
13.union(K key, otherKey[s]):並集
14.unionAndStore(K key, otherKey[s], K destKey
): 存儲並集到destKey
原文地址:http://blog.csdn.net/xiaozhushowtime/article/details/51747330