org.springframework.datastore.redis.collection
Class AbstractRedisCollection

java.lang.Object
  extended by org.springframework.datastore.redis.collection.AbstractRedisCollection
All Implemented Interfaces:
Iterable, Collection, RedisCollection
Direct Known Subclasses:
RedisSet

public abstract class AbstractRedisCollection
extends Object
implements Collection, RedisCollection

Abstract base class for Redis collections


Field Summary
protected  String redisKey
           
protected  RedisTemplate redisTemplate
           
 
Constructor Summary
AbstractRedisCollection(RedisTemplate redisTemplate, String redisKey)
           
 
Method Summary
 boolean addAll(Collection c)
           
 void clear()
           
 boolean containsAll(Collection c)
           
 String getRedisKey()
          They key used by the collection
 boolean isEmpty()
           
 boolean removeAll(Collection c)
           
 boolean retainAll(Collection c)
           
 Object[] toArray()
           
 Object[] toArray(Object[] array)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.datastore.redis.collection.RedisCollection
members, members
 
Methods inherited from interface java.util.Collection
add, contains, equals, hashCode, iterator, remove, size
 

Field Detail

redisTemplate

protected RedisTemplate redisTemplate

redisKey

protected String redisKey
Constructor Detail

AbstractRedisCollection

public AbstractRedisCollection(RedisTemplate redisTemplate,
                               String redisKey)
Method Detail

getRedisKey

public String getRedisKey()
They key used by the collection

Specified by:
getRedisKey in interface RedisCollection
Returns:
The redis key

clear

public void clear()
Specified by:
clear in interface Collection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection

containsAll

public boolean containsAll(Collection c)
Specified by:
containsAll in interface Collection

addAll

public boolean addAll(Collection c)
Specified by:
addAll in interface Collection

retainAll

public boolean retainAll(Collection c)
Specified by:
retainAll in interface Collection

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface Collection

toArray

public Object[] toArray(Object[] array)
Specified by:
toArray in interface Collection