org.springframework.data.keyvalue.redis.support.collections
Class RedisCollectionFactoryBean
java.lang.Object
org.springframework.data.keyvalue.redis.support.collections.RedisCollectionFactoryBean
- All Implemented Interfaces:
- BeanNameAware, FactoryBean<RedisStore>, InitializingBean
public class RedisCollectionFactoryBean
- extends Object
- implements InitializingBean, BeanNameAware, FactoryBean<RedisStore>
Factory bean that facilitates creation of Redis-based collections. Supports list, set, zset (or sortedSet), map (or hash) and properties.
Will use the key type if it exists or to create a dedicated collection (Properties vs Map).
Otherwise uses the provided type (default is list).
- Author:
- Costin Leau
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedisCollectionFactoryBean
public RedisCollectionFactoryBean()
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface InitializingBean
getObject
public RedisStore getObject()
- Specified by:
getObject
in interface FactoryBean<RedisStore>
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interface FactoryBean<RedisStore>
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface FactoryBean<RedisStore>
setBeanName
public void setBeanName(String name)
- Specified by:
setBeanName
in interface BeanNameAware
setType
public void setType(RedisCollectionFactoryBean.CollectionType type)
- Sets the store type. Used if the key does not exist.
- Parameters:
type
- The type to set.
setTemplate
public void setTemplate(RedisTemplate<String,?> template)
- Sets the template used by the resulting store.
- Parameters:
template
- The template to set.
setKey
public void setKey(String key)
- Sets the key of the store.
- Parameters:
key
- The key to set.
Copyright © 2010-2011 SpringSource. All Rights Reserved.