org.springframework.datastore.redis.collection
Class RedisSet
java.lang.Object
org.springframework.datastore.redis.collection.AbstractRedisCollection
org.springframework.datastore.redis.collection.RedisSet
- All Implemented Interfaces:
- Iterable, Collection, Set, RedisCollection
public class RedisSet
- extends AbstractRedisCollection
- implements Set
A Java set implementation that backs onto a Redis set
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedisSet
public RedisSet(RedisTemplate redisTemplate,
String redisKey)
size
public int size()
- Specified by:
size
in interface Collection
- Specified by:
size
in interface Set
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection
- Specified by:
contains
in interface Set
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
- Specified by:
iterator
in interface Set
add
public boolean add(Object o)
- Specified by:
add
in interface Collection
- Specified by:
add
in interface Set
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection
- Specified by:
remove
in interface Set
members
public Set<String> members()
- Specified by:
members
in interface RedisCollection
members
public List<String> members(int offset,
int max)
- Specified by:
members
in interface RedisCollection
random
public String random()
pop
public String pop()