org.springframework.data.keyvalue.redis.support.collections
Class DefaultRedisSet<E>
java.lang.Object
java.util.AbstractCollection<E>
org.springframework.data.keyvalue.redis.support.collections.AbstractRedisCollection<E>
org.springframework.data.keyvalue.redis.support.collections.DefaultRedisSet<E>
- All Implemented Interfaces:
- Iterable<E>, Collection<E>, Set<E>, BoundKeyOperations<String>, RedisCollection<E>, RedisSet<E>, RedisStore
public class DefaultRedisSet<E>
- extends AbstractRedisCollection<E>
- implements RedisSet<E>
Default implementation for RedisSet
.
- Author:
- Costin Leau
Methods inherited from class org.springframework.data.keyvalue.redis.support.collections.AbstractRedisCollection |
addAll, containsAll, equals, expire, expireAt, getExpire, getKey, getOperations, hashCode, persist, removeAll, rename, retainAll, toString |
Methods inherited from interface org.springframework.data.keyvalue.redis.support.collections.RedisStore |
getOperations |
DefaultRedisSet
public DefaultRedisSet(String key,
RedisOperations<String,E> operations)
- Constructs a new
DefaultRedisSet
instance.
- Parameters:
key
- operations
-
DefaultRedisSet
public DefaultRedisSet(BoundSetOperations<String,E> boundOps)
- Constructs a new
DefaultRedisSet
instance.
- Parameters:
boundOps
-
diff
public Set<E> diff(RedisSet<?> set)
- Specified by:
diff
in interface RedisSet<E>
diff
public Set<E> diff(Collection<? extends RedisSet<?>> sets)
- Specified by:
diff
in interface RedisSet<E>
diffAndStore
public RedisSet<E> diffAndStore(RedisSet<?> set,
String destKey)
- Specified by:
diffAndStore
in interface RedisSet<E>
diffAndStore
public RedisSet<E> diffAndStore(Collection<? extends RedisSet<?>> sets,
String destKey)
- Specified by:
diffAndStore
in interface RedisSet<E>
intersect
public Set<E> intersect(RedisSet<?> set)
- Specified by:
intersect
in interface RedisSet<E>
intersect
public Set<E> intersect(Collection<? extends RedisSet<?>> sets)
- Specified by:
intersect
in interface RedisSet<E>
intersectAndStore
public RedisSet<E> intersectAndStore(RedisSet<?> set,
String destKey)
- Specified by:
intersectAndStore
in interface RedisSet<E>
intersectAndStore
public RedisSet<E> intersectAndStore(Collection<? extends RedisSet<?>> sets,
String destKey)
- Specified by:
intersectAndStore
in interface RedisSet<E>
union
public Set<E> union(RedisSet<?> set)
- Specified by:
union
in interface RedisSet<E>
union
public Set<E> union(Collection<? extends RedisSet<?>> sets)
- Specified by:
union
in interface RedisSet<E>
unionAndStore
public RedisSet<E> unionAndStore(RedisSet<?> set,
String destKey)
- Specified by:
unionAndStore
in interface RedisSet<E>
unionAndStore
public RedisSet<E> unionAndStore(Collection<? extends RedisSet<?>> sets,
String destKey)
- Specified by:
unionAndStore
in interface RedisSet<E>
add
public boolean add(E e)
- Specified by:
add
in interface Collection<E>
- Specified by:
add
in interface Set<E>
- Specified by:
add
in class AbstractRedisCollection<E>
clear
public void clear()
- Specified by:
clear
in interface Collection<E>
- Specified by:
clear
in interface Set<E>
- Specified by:
clear
in class AbstractRedisCollection<E>
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection<E>
- Specified by:
contains
in interface Set<E>
- Overrides:
contains
in class AbstractCollection<E>
iterator
public Iterator<E> iterator()
- Specified by:
iterator
in interface Iterable<E>
- Specified by:
iterator
in interface Collection<E>
- Specified by:
iterator
in interface Set<E>
- Specified by:
iterator
in class AbstractCollection<E>
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection<E>
- Specified by:
remove
in interface Set<E>
- Specified by:
remove
in class AbstractRedisCollection<E>
size
public int size()
- Specified by:
size
in interface Collection<E>
- Specified by:
size
in interface Set<E>
- Specified by:
size
in class AbstractCollection<E>
getType
public DataType getType()
- Description copied from interface:
BoundKeyOperations
- Returns the associated Redis type.
- Specified by:
getType
in interface BoundKeyOperations<String>
- Returns:
- key type
Copyright © 2010-2011 SpringSource. All Rights Reserved.