public class DefaultRedisSet<E> extends AbstractRedisCollection<E> implements RedisSet<E>
RedisSet. Note that the collection support works only with normal,
non-pipeline/multi-exec connections as it requires a reply to be sent right away.ENCODING| Constructor and Description |
|---|
DefaultRedisSet(BoundSetOperations<String,E> boundOps)
Constructs a new
DefaultRedisSet instance. |
DefaultRedisSet(String key,
RedisOperations<String,E> operations)
Constructs a new
DefaultRedisSet instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
clear() |
boolean |
contains(Object o) |
Set<E> |
diff(Collection<? extends RedisSet<?>> sets) |
Set<E> |
diff(RedisSet<?> set) |
RedisSet<E> |
diffAndStore(Collection<? extends RedisSet<?>> sets,
String destKey) |
RedisSet<E> |
diffAndStore(RedisSet<?> set,
String destKey) |
DataType |
getType()
Returns the associated Redis type.
|
Set<E> |
intersect(Collection<? extends RedisSet<?>> sets) |
Set<E> |
intersect(RedisSet<?> set) |
RedisSet<E> |
intersectAndStore(Collection<? extends RedisSet<?>> sets,
String destKey) |
RedisSet<E> |
intersectAndStore(RedisSet<?> set,
String destKey) |
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
Cursor<E> |
scan() |
Cursor<E> |
scan(ScanOptions options) |
int |
size() |
Set<E> |
union(Collection<? extends RedisSet<?>> sets) |
Set<E> |
union(RedisSet<?> set) |
RedisSet<E> |
unionAndStore(Collection<? extends RedisSet<?>> sets,
String destKey) |
RedisSet<E> |
unionAndStore(RedisSet<?> set,
String destKey) |
addAll, checkResult, containsAll, equals, expire, expireAt, getExpire, getKey, getOperations, hashCode, persist, removeAll, rename, toStringisEmpty, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOperationsexpire, expire, expireAt, expireAt, getExpire, getKey, persist, renameaddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic DefaultRedisSet(String key, RedisOperations<String,E> operations)
DefaultRedisSet instance.key - Redis key of this set.operations - RedisOperations for the value type of this set.public DefaultRedisSet(BoundSetOperations<String,E> boundOps)
DefaultRedisSet instance.boundOps - BoundSetOperations for the value type of this set.public Set<E> diff(Collection<? extends RedisSet<?>> sets)
public RedisSet<E> diffAndStore(RedisSet<?> set, String destKey)
diffAndStore in interface RedisSet<E>public RedisSet<E> diffAndStore(Collection<? extends RedisSet<?>> sets, String destKey)
diffAndStore in interface RedisSet<E>public Set<E> intersect(Collection<? extends RedisSet<?>> sets)
public RedisSet<E> intersectAndStore(RedisSet<?> set, String destKey)
intersectAndStore in interface RedisSet<E>public RedisSet<E> intersectAndStore(Collection<? extends RedisSet<?>> sets, String destKey)
intersectAndStore in interface RedisSet<E>public Set<E> union(Collection<? extends RedisSet<?>> sets)
public RedisSet<E> unionAndStore(RedisSet<?> set, String destKey)
unionAndStore in interface RedisSet<E>public RedisSet<E> unionAndStore(Collection<? extends RedisSet<?>> sets, String destKey)
unionAndStore in interface RedisSet<E>public boolean add(E e)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public DataType getType()
BoundKeyOperationsgetType in interface BoundKeyOperations<String>public Cursor<E> scan(ScanOptions options)
options - Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.