org.springframework.integration.gemfire.inbound
Class ContinuousQueryMessageProducer
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.gemfire.inbound.ContinuousQueryMessageProducer
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.data.gemfire.listener.ContinuousQueryListener, NamedComponent, MessageProducer, TrackableComponent
public class ContinuousQueryMessageProducer
- extends MessageProducerSupport
- implements org.springframework.data.gemfire.listener.ContinuousQueryListener
Responds to a Gemfire continuous query (set using the #query field) that is
constantly evaluated against a cache
Region
. This is much faster than
re-querying the cache manually.
- Since:
- 2.1
- Author:
- Josh Long, David Turanski
Constructor Summary |
ContinuousQueryMessageProducer(org.springframework.data.gemfire.listener.ContinuousQueryListenerContainer queryListenerContainer,
java.lang.String query)
|
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ContinuousQueryMessageProducer
public ContinuousQueryMessageProducer(org.springframework.data.gemfire.listener.ContinuousQueryListenerContainer queryListenerContainer,
java.lang.String query)
- Parameters:
queryListenerContainer
- a ContinuousQueryListenerContainer
query
- the query string
setQueryName
public void setQueryName(java.lang.String queryName)
- Parameters:
queryName
- optional query name
setDurable
public void setDurable(boolean durable)
- Parameters:
durable
- true if the query is a durable subscription
setSupportedEventTypes
public void setSupportedEventTypes(CqEventType... eventTypes)
onInit
protected void onInit()
- Description copied from class:
IntegrationObjectSupport
- Subclasses may implement this for initialization logic.
onEvent
public void onEvent(com.gemstone.gemfire.cache.query.CqEvent event)
- Specified by:
onEvent
in interface org.springframework.data.gemfire.listener.ContinuousQueryListener
setPayloadExpression
public void setPayloadExpression(java.lang.String payloadExpression)
evaluationResult
protected java.lang.Object evaluationResult(java.lang.Object payload)