public class RedisStoreMessageSource extends AbstractMessageSource<RedisStore>
collectionType attribute.
Default is LIST. This adapter supports 5 types of collections identified by
RedisCollectionFactoryBean.CollectionTypeIntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
RedisStoreMessageSource(RedisConnectionFactory connectionFactory,
Expression keyExpression)
Creates an instance with the provided
RedisConnectionFactory and SpEL expression
which should resolve to a 'key' name of the collection to be used. |
RedisStoreMessageSource(RedisTemplate<String,?> redisTemplate,
Expression keyExpression)
Creates an instance with the provided
RedisTemplate and SpEL expression
which should resolve to a 'key' name of the collection to be used. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCommit(Object object) |
void |
afterRollback(Object object) |
protected RedisStore |
doReceive()
Returns a Message with the view into a
RedisStore identified
by keyExpression |
String |
getComponentType() |
RedisStore |
getResource() |
protected void |
onInit() |
void |
setCollectionType(RedisCollectionFactoryBean.CollectionType collectionType) |
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getMessageCount, getMessageCountLong, getOverrides, isCountsEnabled, isLoggingEnabled, receive, registerMetricsCaptor, reset, setBeanName, setCountsEnabled, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmessageCountpublic RedisStoreMessageSource(RedisTemplate<String,?> redisTemplate, Expression keyExpression)
RedisTemplate and SpEL expression
which should resolve to a 'key' name of the collection to be used.
It assumes that RedisTemplate is fully initialized and ready to be used.
The 'keyExpression' will be evaluated on every call to the AbstractMessageSource.receive() method.redisTemplate - The Redis template.keyExpression - The key expression.public RedisStoreMessageSource(RedisConnectionFactory connectionFactory, Expression keyExpression)
RedisConnectionFactory and SpEL expression
which should resolve to a 'key' name of the collection to be used.
It will create and initialize an instance of StringRedisTemplate that uses
StringRedisSerializer for all
serialization.
The 'keyExpression' will be evaluated on every call to the AbstractMessageSource.receive() method.connectionFactory - The connection factory.keyExpression - The key expression.public void setCollectionType(RedisCollectionFactoryBean.CollectionType collectionType)
protected void onInit()
onInit in class AbstractExpressionEvaluatorprotected RedisStore doReceive()
RedisStore identified
by keyExpressiondoReceive in class AbstractMessageSource<RedisStore>public String getComponentType()
public RedisStore getResource()
public void afterCommit(Object object)
public void afterRollback(Object object)