SGF-331 - Pull common WAN attributes from GatewaySenders and AsyncEventQueues in the SDG XSD into the 'commonWANQueueAttributes' attributes group.
This commit is contained in:
@@ -26,10 +26,15 @@ import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* Bean definition parse for the <gfe:async-event-queue> SDG XML namespace element.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
* @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
|
||||
* @see org.springframework.beans.factory.xml.ParserContext
|
||||
* @see org.springframework.data.gemfire.wan.AsyncEventQueueFactoryBean
|
||||
*/
|
||||
public class AsyncEventQueueParser extends AbstractSingleBeanDefinitionParser {
|
||||
class AsyncEventQueueParser extends AbstractSingleBeanDefinitionParser {
|
||||
|
||||
@Override
|
||||
protected Class<?> getBeanClass(Element element) {
|
||||
@@ -40,34 +45,18 @@ public class AsyncEventQueueParser extends AbstractSingleBeanDefinitionParser {
|
||||
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
|
||||
builder.setLazyInit(false);
|
||||
|
||||
Element asyncEventListenerElement = DomUtils.getChildElementByTagName(element, "async-event-listener");
|
||||
|
||||
Object asyncEventListener = ParsingUtils.parseRefOrSingleNestedBeanDeclaration(parserContext,
|
||||
asyncEventListenerElement, builder);
|
||||
|
||||
builder.addPropertyValue("asyncEventListener", asyncEventListener);
|
||||
|
||||
if (asyncEventListener instanceof RuntimeBeanReference) {
|
||||
builder.addDependsOn(((RuntimeBeanReference) asyncEventListener).getBeanName());
|
||||
}
|
||||
|
||||
String cacheRefAttribute = element.getAttribute("cache-ref");
|
||||
|
||||
String cacheName = (StringUtils.hasText(cacheRefAttribute) ? cacheRefAttribute
|
||||
: GemfireConstants.DEFAULT_GEMFIRE_CACHE_NAME);
|
||||
|
||||
builder.addConstructorArgReference(cacheName);
|
||||
parseAsyncEventListener(element, parserContext, builder);
|
||||
parseCache(element, builder);
|
||||
parseDiskStore(element, builder);
|
||||
|
||||
ParsingUtils.setPropertyValue(element, builder, "batch-size");
|
||||
ParsingUtils.setPropertyValue(element, builder, "maximum-queue-memory");
|
||||
ParsingUtils.setPropertyValue(element, builder, "persistent");
|
||||
ParsingUtils.setPropertyValue(element, builder, "parallel");
|
||||
|
||||
parseDiskStore(element, builder);
|
||||
ParsingUtils.setPropertyValue(element, builder, "persistent");
|
||||
|
||||
if (GemfireUtils.GEMFIRE_VERSION.compareTo("7.0.1") >= 0) {
|
||||
ParsingUtils.setPropertyValue(element, builder, "enable-batch-conflation", "batchConflationEnabled");
|
||||
ParsingUtils.setPropertyValue(element, builder, "batch-conflation-enabled");
|
||||
ParsingUtils.setPropertyValue(element, builder, "disk-synchronous");
|
||||
ParsingUtils.setPropertyValue(element, builder, "batch-time-interval");
|
||||
ParsingUtils.setPropertyValue(element, builder, "disk-synchronous");
|
||||
ParsingUtils.setPropertyValue(element, builder, "dispatcher-threads");
|
||||
@@ -79,15 +68,16 @@ public class AsyncEventQueueParser extends AbstractSingleBeanDefinitionParser {
|
||||
if (!StringUtils.hasText(element.getAttribute(NAME_ATTRIBUTE))) {
|
||||
if (element.getParentNode().getNodeName().endsWith("region")) {
|
||||
Element region = (Element) element.getParentNode();
|
||||
String regionName = StringUtils.hasText(region.getAttribute("name")) ? region.getAttribute("name")
|
||||
: region.getAttribute("id");
|
||||
|
||||
int i = 0;
|
||||
String name = regionName + ".asyncEventQueue#" + i;
|
||||
String regionName = StringUtils.hasText(region.getAttribute(NAME_ATTRIBUTE))
|
||||
? region.getAttribute(NAME_ATTRIBUTE) : region.getAttribute(ID_ATTRIBUTE);
|
||||
|
||||
int index = 0;
|
||||
|
||||
String name = regionName + ".asyncEventQueue#" + index;
|
||||
|
||||
while (parserContext.getRegistry().isBeanNameInUse(name)) {
|
||||
i++;
|
||||
name = regionName + ".asyncEventQueue#" + i;
|
||||
name = regionName + ".asyncEventQueue#" + (++index);
|
||||
}
|
||||
|
||||
builder.addPropertyValue("name", name);
|
||||
@@ -95,6 +85,30 @@ public class AsyncEventQueueParser extends AbstractSingleBeanDefinitionParser {
|
||||
}
|
||||
}
|
||||
|
||||
private void parseAsyncEventListener(final Element element, final ParserContext parserContext,
|
||||
final BeanDefinitionBuilder builder) {
|
||||
|
||||
Element asyncEventListenerElement = DomUtils.getChildElementByTagName(element, "async-event-listener");
|
||||
|
||||
Object asyncEventListener = ParsingUtils.parseRefOrSingleNestedBeanDeclaration(parserContext,
|
||||
asyncEventListenerElement, builder);
|
||||
|
||||
builder.addPropertyValue("asyncEventListener", asyncEventListener);
|
||||
|
||||
if (asyncEventListener instanceof RuntimeBeanReference) {
|
||||
builder.addDependsOn(((RuntimeBeanReference) asyncEventListener).getBeanName());
|
||||
}
|
||||
}
|
||||
|
||||
private void parseCache(final Element element, final BeanDefinitionBuilder builder) {
|
||||
String cacheRefAttribute = element.getAttribute("cache-ref");
|
||||
|
||||
String cacheName = (StringUtils.hasText(cacheRefAttribute) ? cacheRefAttribute
|
||||
: GemfireConstants.DEFAULT_GEMFIRE_CACHE_NAME);
|
||||
|
||||
builder.addConstructorArgReference(cacheName);
|
||||
}
|
||||
|
||||
private void parseDiskStore(final Element element, final BeanDefinitionBuilder builder) {
|
||||
ParsingUtils.setPropertyValue(element, builder, "disk-store-ref");
|
||||
|
||||
|
||||
@@ -24,9 +24,13 @@ import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* Bean definition parser for the <gfe:gateway-sender> element in the SDG XML namespace.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
* @see org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser
|
||||
* @see org.springframework.beans.factory.xml.ParserContext
|
||||
* @see org.springframework.data.gemfire.wan.GatewaySenderFactoryBean
|
||||
*/
|
||||
class GatewaySenderParser extends AbstractSimpleBeanDefinitionParser {
|
||||
|
||||
@@ -37,19 +41,17 @@ class GatewaySenderParser extends AbstractSimpleBeanDefinitionParser {
|
||||
|
||||
@Override
|
||||
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
|
||||
String cacheRef = element.getAttribute("cache-ref");
|
||||
|
||||
builder.addConstructorArgReference((StringUtils.hasText(cacheRef) ? cacheRef
|
||||
: GemfireConstants.DEFAULT_GEMFIRE_CACHE_NAME));
|
||||
parseCache(element, builder);
|
||||
|
||||
ParsingUtils.setPropertyValue(element, builder, NAME_ATTRIBUTE);
|
||||
ParsingUtils.setPropertyValue(element, builder, "alert-threshold");
|
||||
ParsingUtils.setPropertyValue(element, builder, "enable-batch-conflation", "batchConflationEnabled");
|
||||
ParsingUtils.setPropertyValue(element, builder, "batch-conflation-enabled");
|
||||
ParsingUtils.setPropertyValue(element, builder, "batch-size");
|
||||
ParsingUtils.setPropertyValue(element, builder, "batch-time-interval");
|
||||
ParsingUtils.setPropertyValue(element, builder, "disk-store-ref");
|
||||
ParsingUtils.setPropertyValue(element, builder, "disk-synchronous");
|
||||
ParsingUtils.setPropertyValue(element, builder, "dispatcher-threads");
|
||||
ParsingUtils.setPropertyValue(element, builder, "enable-batch-conflation");
|
||||
ParsingUtils.setPropertyValue(element, builder, "manual-start");
|
||||
ParsingUtils.setPropertyValue(element, builder, "maximum-queue-memory");
|
||||
ParsingUtils.setPropertyValue(element, builder, "order-policy");
|
||||
@@ -83,12 +85,12 @@ class GatewaySenderParser extends AbstractSimpleBeanDefinitionParser {
|
||||
String regionName = (StringUtils.hasText(region.getAttribute(NAME_ATTRIBUTE))
|
||||
? region.getAttribute(NAME_ATTRIBUTE) : region.getAttribute(ID_ATTRIBUTE));
|
||||
|
||||
int number = 0;
|
||||
int index = 0;
|
||||
|
||||
String gatewaySenderName = (regionName + ".gatewaySender#" + number);
|
||||
String gatewaySenderName = (regionName + ".gatewaySender#" + index);
|
||||
|
||||
while (parserContext.getRegistry().isBeanNameInUse(gatewaySenderName)) {
|
||||
gatewaySenderName = (regionName + ".gatewaySender#" + (++number));
|
||||
gatewaySenderName = (regionName + ".gatewaySender#" + (++index));
|
||||
}
|
||||
|
||||
builder.addPropertyValue("name", gatewaySenderName);
|
||||
@@ -96,4 +98,11 @@ class GatewaySenderParser extends AbstractSimpleBeanDefinitionParser {
|
||||
}
|
||||
}
|
||||
|
||||
private void parseCache(final Element element, final BeanDefinitionBuilder builder) {
|
||||
String cacheRef = element.getAttribute("cache-ref");
|
||||
|
||||
builder.addConstructorArgReference((StringUtils.hasText(cacheRef) ? cacheRef
|
||||
: GemfireConstants.DEFAULT_GEMFIRE_CACHE_NAME));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,33 +49,35 @@ abstract class ParsingUtils {
|
||||
|
||||
private static final Log log = LogFactory.getLog(ParsingUtils.class);
|
||||
|
||||
static void setPropertyValue(Element element, BeanDefinitionBuilder builder, String attributeName,
|
||||
String propertyName, Object defaultValue) {
|
||||
String attr = element.getAttribute(attributeName);
|
||||
if (StringUtils.hasText(attr)) {
|
||||
builder.addPropertyValue(propertyName, attr);
|
||||
} else {
|
||||
if (defaultValue != null) {
|
||||
builder.addPropertyValue(propertyName, defaultValue);
|
||||
}
|
||||
static void setPropertyValue(Element element, BeanDefinitionBuilder builder,
|
||||
String attributeName, String propertyName, Object defaultValue) {
|
||||
|
||||
String attributeValue = element.getAttribute(attributeName);
|
||||
|
||||
if (StringUtils.hasText(attributeValue)) {
|
||||
builder.addPropertyValue(propertyName, attributeValue);
|
||||
}
|
||||
else if (defaultValue != null) {
|
||||
builder.addPropertyValue(propertyName, defaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
static void setPropertyValue(Element element, BeanDefinitionBuilder builder, String attributeName,
|
||||
String propertyName) {
|
||||
setPropertyValue(element, builder, attributeName, propertyName,null);
|
||||
|
||||
static void setPropertyValue(Element element, BeanDefinitionBuilder builder,
|
||||
String attributeName, String propertyName) {
|
||||
setPropertyValue(element, builder, attributeName, propertyName, null);
|
||||
}
|
||||
|
||||
|
||||
static void setPropertyValue(Element element, BeanDefinitionBuilder builder, String attributeName) {
|
||||
setPropertyValue(element, builder, attributeName, Conventions.attributeNameToPropertyName(attributeName));
|
||||
}
|
||||
|
||||
static void setPropertyReference(Element element, BeanDefinitionBuilder builder, String attrName,
|
||||
String propertyName) {
|
||||
String attr = element.getAttribute(attrName);
|
||||
if (StringUtils.hasText(attr)) {
|
||||
builder.addPropertyReference(propertyName, attr);
|
||||
static void setPropertyReference(Element element, BeanDefinitionBuilder builder,
|
||||
String attributeName, String propertyName) {
|
||||
|
||||
String attributeValue = element.getAttribute(attributeName);
|
||||
|
||||
if (StringUtils.hasText(attributeValue)) {
|
||||
builder.addPropertyReference(propertyName, attributeValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,33 +106,25 @@ abstract class ParsingUtils {
|
||||
|
||||
static Object getBeanReference(ParserContext parserContext, Element element, String refAttributeName) {
|
||||
String refAttributeValue = element.getAttribute(refAttributeName);
|
||||
|
||||
// check nested bean declarations
|
||||
List<Element> childElements = DomUtils.getChildElements(element);
|
||||
Object returnValue = null;
|
||||
|
||||
if (StringUtils.hasText(refAttributeValue)) {
|
||||
if (!childElements.isEmpty()) {
|
||||
if (!DomUtils.getChildElements(element).isEmpty()) {
|
||||
parserContext.getReaderContext().error(String.format(
|
||||
"Use either the '%1$s' attribute or a nested bean declaration for '%2$s' element, but not both.",
|
||||
refAttributeName, element.getLocalName()), element);
|
||||
}
|
||||
|
||||
return new RuntimeBeanReference(refAttributeValue);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
returnValue = new RuntimeBeanReference(refAttributeValue);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
static Object parseRefOrNestedCustomElement(ParserContext parserContext, Element element,
|
||||
BeanDefinitionBuilder builder) {
|
||||
Object beanRef = ParsingUtils.getBeanReference(parserContext, element, "bean");
|
||||
if (beanRef != null) {
|
||||
return beanRef;
|
||||
}
|
||||
else {
|
||||
return parserContext.getDelegate().parseCustomElement(element, builder.getBeanDefinition());
|
||||
}
|
||||
return (beanRef != null ? beanRef : parserContext.getDelegate().parseCustomElement(element, builder.getBeanDefinition()));
|
||||
}
|
||||
|
||||
static Object parseRefOrSingleNestedBeanDeclaration(ParserContext parserContext, Element element,
|
||||
@@ -145,6 +139,7 @@ abstract class ParsingUtils {
|
||||
|
||||
static Object parseRefOrNestedBeanDeclaration(ParserContext parserContext, Element element,
|
||||
BeanDefinitionBuilder builder, String refAttributeName, boolean single) {
|
||||
|
||||
Object beanReference = getBeanReference(parserContext, element, refAttributeName);
|
||||
|
||||
if (beanReference != null) {
|
||||
@@ -254,6 +249,7 @@ abstract class ParsingUtils {
|
||||
|
||||
static void parseTransportFilters(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
|
||||
Element transportFilterElement = DomUtils.getChildElementByTagName(element, "transport-filter");
|
||||
|
||||
if (transportFilterElement != null) {
|
||||
builder.addPropertyValue("transportFilters", parseRefOrNestedBeanDeclaration(parserContext,
|
||||
transportFilterElement, builder));
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.gemstone.gemfire.cache.util.Gateway;
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class AsyncEventQueueFactoryBean extends AbstractWANComponentFactoryBean<AsyncEventQueue> {
|
||||
|
||||
private AsyncEventListener asyncEventListener;
|
||||
@@ -150,20 +151,72 @@ public class AsyncEventQueueFactoryBean extends AbstractWANComponentFactoryBean<
|
||||
this.asyncEventListener = listener;
|
||||
}
|
||||
|
||||
public void setDiskStoreRef(String diskStoreRef) {
|
||||
this.diskStoreReference = diskStoreRef;
|
||||
/**
|
||||
* @param asyncEventQueue overrides Async Event Queue returned by this FactoryBean.
|
||||
*/
|
||||
public void setAsyncEventQueue(AsyncEventQueue asyncEventQueue) {
|
||||
this.asyncEventQueue = asyncEventQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the Async Event Queue's (AEQ) should conflate messages.
|
||||
*
|
||||
* @param batchConflationEnabled a boolean value indicating whether to conflate queued events.
|
||||
*/
|
||||
public void setBatchConflationEnabled(Boolean batchConflationEnabled) {
|
||||
this.batchConflationEnabled = batchConflationEnabled;
|
||||
}
|
||||
|
||||
public void setBatchSize(Integer batchSize) {
|
||||
this.batchSize = batchSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Aysync Event Queue's (AEQ) interval between sending batches.
|
||||
*
|
||||
* @param batchTimeInterval an integer value indicating the maximum number of milliseconds that can elapse
|
||||
* between sending batches.
|
||||
*/
|
||||
public void setBatchTimeInterval(Integer batchTimeInterval) {
|
||||
this.batchTimeInterval = batchTimeInterval;
|
||||
}
|
||||
|
||||
public void setDiskStoreRef(String diskStoreRef) {
|
||||
this.diskStoreReference = diskStoreRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Async Event Queue (AEQ) disk write synchronization policy.
|
||||
*
|
||||
* @param diskSynchronous a boolean value indicating whether disk writes are synchronous.
|
||||
*/
|
||||
public void setDiskSynchronous(Boolean diskSynchronous) {
|
||||
this.diskSynchronous = diskSynchronous;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the number of dispatcher threads used to process Region Events from the associated Async Event Queue (AEQ).
|
||||
*
|
||||
* @param dispatcherThreads an Integer indicating the number of dispatcher threads used to process Region Events
|
||||
* from the associated Queue.
|
||||
*/
|
||||
public void setDispatcherThreads(Integer dispatcherThreads) {
|
||||
this.dispatcherThreads = dispatcherThreads;
|
||||
}
|
||||
|
||||
public void setMaximumQueueMemory(Integer maximumQueueMemory) {
|
||||
this.maximumQueueMemory = maximumQueueMemory;
|
||||
}
|
||||
|
||||
public void setPersistent(Boolean persistent) {
|
||||
this.persistent = persistent;
|
||||
/**
|
||||
* Set the Async Event Queue (AEQ) ordering policy (e.g. KEY, PARTITION, THREAD). When dispatcher threads
|
||||
* are greater than 1, the ordering policy configures the way in which multiple dispatcher threads
|
||||
* process Region events from the queue.
|
||||
*
|
||||
* @param orderPolicy a String to indicate the AEQ order policy.
|
||||
*/
|
||||
public void setOrderPolicy(String orderPolicy) {
|
||||
this.orderPolicy = orderPolicy;
|
||||
}
|
||||
|
||||
public void setParallel(Boolean parallel) {
|
||||
@@ -178,60 +231,8 @@ public class AsyncEventQueueFactoryBean extends AbstractWANComponentFactoryBean<
|
||||
return Boolean.TRUE.equals(parallel);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param asyncEventQueue overrides Async Event Queue returned by this FactoryBean.
|
||||
*/
|
||||
public void setAsyncEventQueue(AsyncEventQueue asyncEventQueue) {
|
||||
this.asyncEventQueue = asyncEventQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the number of dispatcher threads used to process Region events from the associated Aysnc Event Queue (AEQ).
|
||||
*
|
||||
* @param dispatcherThreads an integer indicating the number of dispatcher threads used to process Region events
|
||||
* from the associated queue.
|
||||
*/
|
||||
public void setDispatcherThreads(Integer dispatcherThreads) {
|
||||
this.dispatcherThreads = dispatcherThreads;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Aysync Event Queue's (AEQ) interval between sending batches.
|
||||
*
|
||||
* @param batchTimeInterval an integer value indicating the maximum number of milliseconds that can elapse
|
||||
* between sending batches.
|
||||
*/
|
||||
public void setBatchTimeInterval(Integer batchTimeInterval) {
|
||||
this.batchTimeInterval = batchTimeInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the Async Event Queue's (AEQ) should conflate messages.
|
||||
*
|
||||
* @param batchConflationEnabled a boolean value indicating whether to conflate queued events.
|
||||
*/
|
||||
public void setBatchConflationEnabled(Boolean batchConflationEnabled) {
|
||||
this.batchConflationEnabled = batchConflationEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Async Event Queue (AEQ) disk write synchronization policy.
|
||||
*
|
||||
* @param diskSynchronous a boolean value indicating whether disk writes are synchronous.
|
||||
*/
|
||||
public void setDiskSynchronous(Boolean diskSynchronous) {
|
||||
this.diskSynchronous = diskSynchronous;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Async Event Queue (AEQ) ordering policy (e.g. KEY, PARTITION, THREAD). When dispatcher threads
|
||||
* are greater than 1, the ordering policy configures the way in which multiple dispatcher threads
|
||||
* process Region events from the queue.
|
||||
*
|
||||
* @param orderPolicy a String to indicate the AEQ order policy.
|
||||
*/
|
||||
public void setOrderPolicy(String orderPolicy) {
|
||||
this.orderPolicy = orderPolicy;
|
||||
public void setPersistent(Boolean persistent) {
|
||||
this.persistent = persistent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<Ga
|
||||
private List<GatewayTransportFilter> transportFilters;
|
||||
|
||||
private Boolean diskSynchronous;
|
||||
private Boolean enableBatchConflation;
|
||||
private Boolean batchConflationEnabled;
|
||||
private Boolean parallel;
|
||||
private Boolean persistent;
|
||||
|
||||
@@ -96,8 +96,8 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<Ga
|
||||
|
||||
@Override
|
||||
protected void doInit() {
|
||||
GatewaySenderFactory gatewaySenderFactory = (this.factory != null ? (GatewaySenderFactory) factory :
|
||||
cache.createGatewaySenderFactory());
|
||||
GatewaySenderFactory gatewaySenderFactory = (this.factory != null ? (GatewaySenderFactory) factory
|
||||
: cache.createGatewaySenderFactory());
|
||||
|
||||
if (alertThreshold != null) {
|
||||
gatewaySenderFactory.setAlertThreshold(alertThreshold);
|
||||
@@ -123,8 +123,8 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<Ga
|
||||
gatewaySenderFactory.setDispatcherThreads(dispatcherThreads);
|
||||
}
|
||||
|
||||
if (enableBatchConflation != null) {
|
||||
gatewaySenderFactory.setBatchConflationEnabled(enableBatchConflation);
|
||||
if (batchConflationEnabled != null) {
|
||||
gatewaySenderFactory.setBatchConflationEnabled(batchConflationEnabled);
|
||||
}
|
||||
|
||||
if (!CollectionUtils.isEmpty(eventFilters)) {
|
||||
@@ -176,24 +176,24 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<Ga
|
||||
gatewaySender = wrapper;
|
||||
}
|
||||
|
||||
public void setRemoteDistributedSystemId(int remoteDistributedSystemId) {
|
||||
this.remoteDistributedSystemId = remoteDistributedSystemId;
|
||||
}
|
||||
|
||||
public void setEventFilters(List<GatewayEventFilter> gatewayEventFilters) {
|
||||
this.eventFilters = gatewayEventFilters;
|
||||
}
|
||||
|
||||
public void setTransportFilters(List<GatewayTransportFilter> gatewayTransportFilters) {
|
||||
this.transportFilters = gatewayTransportFilters;
|
||||
}
|
||||
|
||||
public void setAlertThreshold(Integer alertThreshold) {
|
||||
this.alertThreshold = alertThreshold;
|
||||
}
|
||||
|
||||
public void setBatchConflationEnabled(Boolean batchConflationEnabled) {
|
||||
this.batchConflationEnabled = batchConflationEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Boolean value that determines whether GemFire should conflate messages.
|
||||
*
|
||||
* @param enableBatchConflation a boolean value indicating whether GemFire should conflate messages in the Queue.
|
||||
* @see #setBatchConflationEnabled(Boolean)
|
||||
* @deprecated use setBatchConflationEnabled(Boolean)
|
||||
*/
|
||||
@Deprecated
|
||||
public void setEnableBatchConflation(Boolean enableBatchConflation) {
|
||||
this.enableBatchConflation = enableBatchConflation;
|
||||
this.batchConflationEnabled = enableBatchConflation;
|
||||
}
|
||||
|
||||
public void setBatchSize(Integer batchSize) {
|
||||
@@ -216,6 +216,10 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<Ga
|
||||
this.dispatcherThreads = dispatcherThreads;
|
||||
}
|
||||
|
||||
public void setEventFilters(List<GatewayEventFilter> gatewayEventFilters) {
|
||||
this.eventFilters = gatewayEventFilters;
|
||||
}
|
||||
|
||||
public void setEventSubstitutionFilter(final GatewayEventSubstitutionFilter eventSubstitutionFilter) {
|
||||
this.eventSubstitutionFilter = eventSubstitutionFilter;
|
||||
}
|
||||
@@ -256,6 +260,10 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<Ga
|
||||
return Boolean.TRUE.equals(this.persistent);
|
||||
}
|
||||
|
||||
public void setRemoteDistributedSystemId(int remoteDistributedSystemId) {
|
||||
this.remoteDistributedSystemId = remoteDistributedSystemId;
|
||||
}
|
||||
|
||||
public void setSocketBufferSize(Integer socketBufferSize) {
|
||||
this.socketBufferSize = socketBufferSize;
|
||||
}
|
||||
@@ -264,6 +272,10 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<Ga
|
||||
this.socketReadTimeout = socketReadTimeout;
|
||||
}
|
||||
|
||||
public void setTransportFilters(List<GatewayTransportFilter> gatewayTransportFilters) {
|
||||
this.transportFilters = gatewayTransportFilters;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.context.SmartLifecycle#isAutoStartup()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user