removed leftover gemfire 7 dependencies
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.gemfire.config;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.gemfire.wan.AsyncEventQueueFactoryBean;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import com.gemstone.gemfire.internal.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* @author David Turanski
|
||||
*
|
||||
*/
|
||||
public class AsyncEventQueueParser extends AbstractSingleBeanDefinitionParser {
|
||||
|
||||
@Override
|
||||
protected Class<?> getBeanClass(Element element) {
|
||||
return AsyncEventQueueFactoryBean.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
String cacheName = StringUtils.isEmpty(element.getAttribute("cache-ref")) ? "gemfireCache" : element
|
||||
.getAttribute("cache-ref");
|
||||
builder.addConstructorArgReference(cacheName);
|
||||
builder.addConstructorArgValue(asyncEventListener);
|
||||
ParsingUtils.setPropertyValue(element, builder, "batch-size");
|
||||
ParsingUtils.setPropertyValue(element, builder, "maximum-queue-memory");
|
||||
ParsingUtils.setPropertyValue(element, builder, "disk-store-ref");
|
||||
ParsingUtils.setPropertyValue(element, builder, "persistent");
|
||||
ParsingUtils.setPropertyValue(element, builder, "parallel");
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.gemfire.config;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.gemfire.wan.GatewayReceiverFactoryBean;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* @author David Turanski
|
||||
*
|
||||
*/
|
||||
class GatewayReceiverParser extends AbstractSimpleBeanDefinitionParser {
|
||||
@Override
|
||||
protected Class<?> getBeanClass(Element element) {
|
||||
return GatewayReceiverFactoryBean.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
|
||||
builder.setLazyInit(false);
|
||||
String cacheRef = element.getAttribute("cache-ref");
|
||||
// add cache reference (fallback to default if nothing is specified)
|
||||
builder.addConstructorArgReference((StringUtils.hasText(cacheRef) ? cacheRef : "gemfireCache"));
|
||||
ParsingUtils.setPropertyValue(element, builder, "start-port");
|
||||
ParsingUtils.setPropertyValue(element, builder, "end-port");
|
||||
ParsingUtils.setPropertyValue(element, builder, "socket-buffer-size");
|
||||
ParsingUtils.setPropertyValue(element, builder, "maximum-time-between-pings");
|
||||
ParsingUtils.setPropertyValue(element, builder, "bind-address");
|
||||
ParsingUtils.parseTransportFilters(element, parserContext, builder);
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.gemfire.config;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.data.gemfire.wan.GatewaySenderFactoryBean;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* @author David Turanski
|
||||
*
|
||||
*/
|
||||
class GatewaySenderParser extends AbstractSimpleBeanDefinitionParser {
|
||||
|
||||
@Override
|
||||
protected Class<?> getBeanClass(Element element) {
|
||||
return GatewaySenderFactoryBean.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
|
||||
builder.setLazyInit(false);
|
||||
String cacheRef = element.getAttribute("cache-ref");
|
||||
// add cache reference (fallback to default if nothing is specified)
|
||||
builder.addConstructorArgReference((StringUtils.hasText(cacheRef) ? cacheRef : "gemfireCache"));
|
||||
ParsingUtils.setPropertyValue(element, builder, "alert-threshold");
|
||||
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");
|
||||
ParsingUtils.setPropertyValue(element, builder, "remote-distributed-system-id");
|
||||
ParsingUtils.setPropertyValue(element, builder, "socket-buffer-size");
|
||||
ParsingUtils.setPropertyValue(element, builder, "socket-read-timeout");
|
||||
ParsingUtils.setPropertyValue(element, builder, "persistent");
|
||||
ParsingUtils.setPropertyValue(element, builder, "parallel");
|
||||
|
||||
Element eventFilterElement = DomUtils.getChildElementByTagName(element, "event-filter");
|
||||
if (eventFilterElement != null) {
|
||||
builder.addPropertyValue("eventFilters",
|
||||
ParsingUtils.parseRefOrNestedBeanDeclaration(parserContext, eventFilterElement, builder));
|
||||
}
|
||||
|
||||
ParsingUtils.parseTransportFilters(element, parserContext, builder);
|
||||
}
|
||||
}
|
||||
@@ -61,9 +61,6 @@ class GemfireNamespaceHandler extends NamespaceHandlerSupport {
|
||||
registerBeanDefinitionParser("cache-server", new CacheServerParser());
|
||||
registerBeanDefinitionParser("transaction-manager", new TransactionManagerParser());
|
||||
registerBeanDefinitionParser("cq-listener-container", new GemfireListenerContainerParser());
|
||||
registerBeanDefinitionParser("async-event-queue", new AsyncEventQueueParser());
|
||||
registerBeanDefinitionParser("gateway-sender", new GatewaySenderParser());
|
||||
registerBeanDefinitionParser("gateway-receiver", new GatewayReceiverParser());
|
||||
registerBeanDefinitionParser("function-service", new FunctionServiceParser());
|
||||
// V6 WAN parsers
|
||||
registerBeanDefinitionParser("gateway-hub", new GatewayHubParser());
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.gemfire.wan;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
|
||||
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
|
||||
import com.gemstone.gemfire.cache.Cache;
|
||||
import com.gemstone.gemfire.cache.CacheClosedException;
|
||||
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
|
||||
|
||||
/**
|
||||
* FactoryBean for creating GemFire {@link AsyncEventQueue}s.
|
||||
* @author David Turanski
|
||||
*
|
||||
*/
|
||||
public class AsyncEventQueueFactoryBean extends AbstractWANComponentFactoryBean<AsyncEventQueue> {
|
||||
|
||||
public void setDiskStoreRef(String diskStoreRef) {
|
||||
this.diskStoreRef = diskStoreRef;
|
||||
}
|
||||
|
||||
private final AsyncEventListener asyncEventListener;
|
||||
|
||||
private AsyncEventQueue asyncEventQueue;
|
||||
|
||||
private Integer batchSize;
|
||||
|
||||
private Integer maximumQueueMemory;
|
||||
|
||||
private Boolean persistent;
|
||||
|
||||
private String diskStoreRef;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cache the gemfire cache
|
||||
* @param asyncEventListener required {@link AsyncEventListener}
|
||||
*/
|
||||
public AsyncEventQueueFactoryBean(Cache cache, AsyncEventListener asyncEventListener) {
|
||||
super(cache);
|
||||
this.asyncEventListener = asyncEventListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncEventQueue getObject() throws Exception {
|
||||
return asyncEventQueue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
return AsyncEventQueue.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doInit() {
|
||||
Assert.notNull(asyncEventListener, "AsyncEventListener cannot be null");
|
||||
AsyncEventQueueFactory asyncEventQueueFactory = null;
|
||||
if (this.factory == null) {
|
||||
asyncEventQueueFactory = cache.createAsyncEventQueueFactory();
|
||||
} else {
|
||||
asyncEventQueueFactory = (AsyncEventQueueFactory)factory;
|
||||
}
|
||||
|
||||
if (persistent != null) {
|
||||
asyncEventQueueFactory.setPersistent(persistent);
|
||||
}
|
||||
if (batchSize != null) {
|
||||
asyncEventQueueFactory.setBatchSize(batchSize);
|
||||
}
|
||||
if (diskStoreRef != null) {
|
||||
persistent = (persistent == null) ? Boolean.TRUE : persistent;
|
||||
Assert.isTrue(persistent, "specifying a disk store requires persistent property to be true");
|
||||
asyncEventQueueFactory.setDiskStoreName(diskStoreRef);
|
||||
}
|
||||
|
||||
if (maximumQueueMemory != null) {
|
||||
asyncEventQueueFactory.setMaximumQueueMemory(maximumQueueMemory);
|
||||
}
|
||||
|
||||
asyncEventQueue = asyncEventQueueFactory.create(name, asyncEventListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
if (!cache.isClosed()) {
|
||||
try {
|
||||
asyncEventListener.close();
|
||||
}
|
||||
catch (CacheClosedException cce) {
|
||||
// nothing to see folks, move on.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setBatchSize(Integer batchSize) {
|
||||
this.batchSize = batchSize;
|
||||
}
|
||||
|
||||
public void setMaximumQueueMemory(Integer maximumQueueMemory) {
|
||||
this.maximumQueueMemory = maximumQueueMemory;
|
||||
}
|
||||
|
||||
public void setPersistent(Boolean persistent) {
|
||||
this.persistent = persistent;
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.gemfire.wan;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import com.gemstone.gemfire.cache.Cache;
|
||||
import com.gemstone.gemfire.cache.wan.GatewayReceiver;
|
||||
import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
|
||||
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
|
||||
|
||||
/**
|
||||
* FactoryBean for creating a GemFire {@link GatewayReceiver}.
|
||||
*
|
||||
* @author David Turanski
|
||||
*
|
||||
*/
|
||||
public class GatewayReceiverFactoryBean extends AbstractWANComponentFactoryBean<GatewayReceiver> {
|
||||
private GatewayReceiver gatewayReceiver;
|
||||
|
||||
private List<GatewayTransportFilter> transportFilters;
|
||||
|
||||
private Integer startPort;
|
||||
|
||||
private Integer endPort;
|
||||
|
||||
private Integer maximumTimeBetweenPings;
|
||||
|
||||
private Integer socketBufferSize;
|
||||
|
||||
private String bindAddress;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cache
|
||||
*/
|
||||
public GatewayReceiverFactoryBean(Cache cache) {
|
||||
super(cache);
|
||||
// Bean name not required.
|
||||
this.name = "gateway-receiver";
|
||||
}
|
||||
|
||||
@Override
|
||||
public GatewayReceiver getObject() throws Exception {
|
||||
return gatewayReceiver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
return GatewayReceiver.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doInit() {
|
||||
GatewayReceiverFactory gatewayReceiverFactory = cache.createGatewayReceiverFactory();
|
||||
if (!CollectionUtils.isEmpty(transportFilters)) {
|
||||
for (GatewayTransportFilter transportFilter : transportFilters) {
|
||||
gatewayReceiverFactory.addGatewayTransportFilter(transportFilter);
|
||||
}
|
||||
}
|
||||
int minPort = (startPort == null) ? GatewayReceiver.DEFAULT_START_PORT : startPort;
|
||||
int maxPort = (endPort == null) ? GatewayReceiver.DEFAULT_END_PORT : endPort;
|
||||
Assert.isTrue(minPort <= maxPort, "startPort must be less then or equal to " + maxPort);
|
||||
gatewayReceiverFactory.setStartPort(minPort);
|
||||
gatewayReceiverFactory.setEndPort(maxPort);
|
||||
if (socketBufferSize != null) {
|
||||
gatewayReceiverFactory.setSocketBufferSize(socketBufferSize);
|
||||
}
|
||||
if (maximumTimeBetweenPings != null) {
|
||||
gatewayReceiverFactory.setMaximumTimeBetweenPings(maximumTimeBetweenPings);
|
||||
}
|
||||
if (bindAddress != null) {
|
||||
gatewayReceiverFactory.setBindAddress(bindAddress);
|
||||
}
|
||||
|
||||
gatewayReceiver = gatewayReceiverFactory.create();
|
||||
}
|
||||
|
||||
public void setGatewayReceiver(GatewayReceiver gatewayReceiver) {
|
||||
this.gatewayReceiver = gatewayReceiver;
|
||||
}
|
||||
|
||||
public void setTransportFilters(List<GatewayTransportFilter> transportFilters) {
|
||||
this.transportFilters = transportFilters;
|
||||
}
|
||||
|
||||
public void setStartPort(Integer startPort) {
|
||||
this.startPort = startPort;
|
||||
}
|
||||
|
||||
public void setEndPort(Integer endPort) {
|
||||
this.endPort = endPort;
|
||||
}
|
||||
|
||||
public void setMaximumTimeBetweenPings(Integer maximumTimeBetweenPings) {
|
||||
this.maximumTimeBetweenPings = maximumTimeBetweenPings;
|
||||
}
|
||||
|
||||
public void setSocketBufferSize(Integer socketBufferSize) {
|
||||
this.socketBufferSize = socketBufferSize;
|
||||
}
|
||||
|
||||
public void setBindAddress(String bindAddress) {
|
||||
this.bindAddress = bindAddress;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.gemfire.wan;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import com.gemstone.gemfire.cache.Cache;
|
||||
import com.gemstone.gemfire.cache.util.Gateway;
|
||||
import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
|
||||
import com.gemstone.gemfire.cache.wan.GatewaySender;
|
||||
import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
|
||||
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
|
||||
|
||||
/**
|
||||
* FactoryBean for creating a GemFire {@link GatewaySender}.
|
||||
* @author David Turanski
|
||||
*
|
||||
*/
|
||||
public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean<GatewaySender> {
|
||||
private static List<String> validOrderPolicyValues = Arrays.asList("KEY", "PARTITION", "THREAD");
|
||||
|
||||
private GatewaySender gatewaySender;
|
||||
|
||||
private int remoteDistributedSystemId;
|
||||
|
||||
private List<GatewayEventFilter> eventFilters;
|
||||
|
||||
private List<GatewayTransportFilter> transportFilters;
|
||||
|
||||
private Integer alertThreshold;
|
||||
|
||||
private Boolean enableBatchConflation;
|
||||
|
||||
private Integer batchSize;
|
||||
|
||||
private Integer batchTimeInterval;
|
||||
|
||||
private String diskStoreRef;
|
||||
|
||||
private Boolean diskSynchronous;
|
||||
|
||||
private Integer dispatcherThreads;
|
||||
|
||||
private Boolean manualStart;
|
||||
|
||||
private Integer maximumQueueMemory;
|
||||
|
||||
private String orderPolicy;
|
||||
|
||||
private Boolean parallel;
|
||||
|
||||
private Boolean persistent;
|
||||
|
||||
private Integer socketBufferSize;
|
||||
|
||||
private Integer socketReadTimeout;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param cache the Gemfire cache
|
||||
*/
|
||||
public GatewaySenderFactoryBean(Cache cache) {
|
||||
super(cache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GatewaySender getObject() throws Exception {
|
||||
return gatewaySender;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
return GatewaySender.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doInit() {
|
||||
GatewaySenderFactory gatewaySenderFactory = null;
|
||||
if (this.factory == null) {
|
||||
gatewaySenderFactory = cache.createGatewaySenderFactory();
|
||||
} else {
|
||||
gatewaySenderFactory = (GatewaySenderFactory)factory;
|
||||
}
|
||||
if (diskStoreRef != null) {
|
||||
persistent = (persistent == null) ? Boolean.TRUE : persistent;
|
||||
Assert.isTrue(persistent, "specifying a disk store requires persistent property to be true");
|
||||
gatewaySenderFactory.setDiskStoreName(diskStoreRef);
|
||||
}
|
||||
|
||||
if (diskSynchronous != null) {
|
||||
persistent = (persistent == null) ? Boolean.TRUE : persistent;
|
||||
Assert.isTrue(persistent, "specifying a disk synchronous requires persistent property to be true");
|
||||
gatewaySenderFactory.setDiskSynchronous(diskSynchronous);
|
||||
}
|
||||
|
||||
if (persistent != null) {
|
||||
gatewaySenderFactory.setPersistenceEnabled(persistent);
|
||||
}
|
||||
|
||||
parallel = (parallel == null) ? Boolean.FALSE : parallel;
|
||||
|
||||
gatewaySenderFactory.setParallel(parallel);
|
||||
|
||||
if (orderPolicy != null) {
|
||||
Assert.isTrue(parallel, "specifying an order policy requires the parallel property to be true");
|
||||
|
||||
Assert.isTrue(validOrderPolicyValues.contains(orderPolicy.toUpperCase()), "The value of order policy:'"
|
||||
+ orderPolicy + "' is invalid");
|
||||
gatewaySenderFactory.setOrderPolicy(Gateway.OrderPolicy.valueOf(orderPolicy.toUpperCase()));
|
||||
}
|
||||
|
||||
if (!CollectionUtils.isEmpty(eventFilters)) {
|
||||
for (GatewayEventFilter eventFilter : eventFilters) {
|
||||
gatewaySenderFactory.addGatewayEventFilter(eventFilter);
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(transportFilters)) {
|
||||
for (GatewayTransportFilter transportFilter : transportFilters) {
|
||||
gatewaySenderFactory.addGatewayTransportFilter(transportFilter);
|
||||
}
|
||||
}
|
||||
if (alertThreshold != null) {
|
||||
gatewaySenderFactory.setAlertThreshold(alertThreshold);
|
||||
}
|
||||
if (enableBatchConflation != null) {
|
||||
gatewaySenderFactory.setBatchConflationEnabled(enableBatchConflation);
|
||||
}
|
||||
if (batchSize != null) {
|
||||
gatewaySenderFactory.setBatchSize(batchSize);
|
||||
}
|
||||
if (batchTimeInterval != null) {
|
||||
gatewaySenderFactory.setBatchTimeInterval(batchTimeInterval);
|
||||
}
|
||||
if (dispatcherThreads != null) {
|
||||
gatewaySenderFactory.setDispatcherThreads(dispatcherThreads);
|
||||
}
|
||||
if (manualStart != null) {
|
||||
gatewaySenderFactory.setManualStart(manualStart);
|
||||
}
|
||||
if (maximumQueueMemory != null) {
|
||||
gatewaySenderFactory.setMaximumQueueMemory(maximumQueueMemory);
|
||||
}
|
||||
if (socketBufferSize != null) {
|
||||
gatewaySenderFactory.setSocketBufferSize(socketBufferSize);
|
||||
}
|
||||
if (socketReadTimeout != null) {
|
||||
gatewaySenderFactory.setSocketReadTimeout(socketReadTimeout);
|
||||
}
|
||||
gatewaySender = gatewaySenderFactory.create(name, remoteDistributedSystemId);
|
||||
}
|
||||
|
||||
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 setEnableBatchConflation(Boolean enableBatchConflation) {
|
||||
this.enableBatchConflation = enableBatchConflation;
|
||||
}
|
||||
|
||||
public void setBatchSize(Integer batchSize) {
|
||||
this.batchSize = batchSize;
|
||||
}
|
||||
|
||||
public void setBatchTimeInterval(Integer batchTimeInterval) {
|
||||
this.batchTimeInterval = batchTimeInterval;
|
||||
}
|
||||
|
||||
public void setDiskStoreRef(String diskStoreRef) {
|
||||
this.diskStoreRef = diskStoreRef;
|
||||
}
|
||||
|
||||
public void setDiskSynchronous(Boolean diskSynchronous) {
|
||||
this.diskSynchronous = diskSynchronous;
|
||||
}
|
||||
|
||||
public void setDispatcherThreads(Integer dispatcherThreads) {
|
||||
this.dispatcherThreads = dispatcherThreads;
|
||||
}
|
||||
|
||||
public void setManualStart(Boolean manualStart) {
|
||||
this.manualStart = manualStart;
|
||||
}
|
||||
|
||||
public void setMaximumQueueMemory(Integer maximumQueueMemory) {
|
||||
this.maximumQueueMemory = maximumQueueMemory;
|
||||
}
|
||||
|
||||
public void setOrderPolicy(String orderPolicy) {
|
||||
this.orderPolicy = orderPolicy;
|
||||
}
|
||||
|
||||
public void setParallel(Boolean parallel) {
|
||||
this.parallel = parallel;
|
||||
}
|
||||
|
||||
public void setPersistent(Boolean persistent) {
|
||||
this.persistent = persistent;
|
||||
}
|
||||
|
||||
public void setSocketBufferSize(Integer socketBufferSize) {
|
||||
this.socketBufferSize = socketBufferSize;
|
||||
}
|
||||
|
||||
public void setSocketReadTimeout(Integer socketReadTimeout) {
|
||||
this.socketReadTimeout = socketReadTimeout;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user