SGF-644 - Adapt to API changes in the org.apache.geode.cache.wan.GatewaySender class based on the Apache Geode 1.2.0 baseline.
This commit is contained in:
@@ -22,6 +22,9 @@ import org.apache.geode.cache.wan.GatewayTransportFilter;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* {@link GatewaySenderWrapper} is an Adapter around a {@link GatewaySender} providing the ability to control
|
||||
* manual start and stop.
|
||||
*
|
||||
* @author David Turanski
|
||||
* @author John Blum
|
||||
* @see org.apache.geode.cache.util.Gateway
|
||||
@@ -33,162 +36,268 @@ public class GatewaySenderWrapper implements GatewaySender {
|
||||
|
||||
private final GatewaySender delegate;
|
||||
|
||||
public GatewaySenderWrapper(final GatewaySender gatewaySender) {
|
||||
Assert.notNull(gatewaySender, "The target Gateway Sender must not be null.");
|
||||
this.delegate = gatewaySender;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
delegate.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
delegate.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pause() {
|
||||
delegate.pause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resume() {
|
||||
delegate.resume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rebalance() {
|
||||
delegate.rebalance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return delegate.isRunning();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPaused() {
|
||||
return delegate.isPaused();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGatewayEventFilter(GatewayEventFilter filter) {
|
||||
delegate.addGatewayEventFilter(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeGatewayEventFilter(GatewayEventFilter filter) {
|
||||
delegate.removeGatewayEventFilter(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return delegate.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRemoteDSId() {
|
||||
return delegate.getRemoteDSId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSocketBufferSize() {
|
||||
return delegate.getSocketBufferSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSocketReadTimeout() {
|
||||
return delegate.getSocketReadTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDiskStoreName() {
|
||||
return delegate.getDiskStoreName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumQueueMemory() {
|
||||
return delegate.getMaximumQueueMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBatchSize() {
|
||||
return delegate.getBatchSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBatchTimeInterval() {
|
||||
return delegate.getBatchTimeInterval();
|
||||
/**
|
||||
* Constructs an instance of {@link GatewaySenderWrapper} initialized with the given {@link GatewaySender} to adapt.
|
||||
*
|
||||
* @param gatewaySender {@link GatewaySender} to adapt.
|
||||
* @throws IllegalArgumentException if {@link GatewaySender} is {@literal null}.
|
||||
* @see org.apache.geode.cache.wan.GatewaySender
|
||||
*/
|
||||
public GatewaySenderWrapper(GatewaySender gatewaySender) {
|
||||
Assert.notNull(gatewaySender, "GatewaySender must not be null");
|
||||
this.delegate = gatewaySender;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isBatchConflationEnabled() {
|
||||
return delegate.isBatchConflationEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPersistenceEnabled() {
|
||||
return delegate.isPersistenceEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAlertThreshold() {
|
||||
return delegate.getAlertThreshold();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GatewayEventFilter> getGatewayEventFilters() {
|
||||
return delegate.getGatewayEventFilters();
|
||||
}
|
||||
|
||||
public GatewayEventSubstitutionFilter getGatewayEventSubstitutionFilter() {
|
||||
return delegate.getGatewayEventSubstitutionFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GatewayTransportFilter> getGatewayTransportFilters() {
|
||||
return delegate.getGatewayTransportFilters();
|
||||
return this.delegate.isBatchConflationEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isDiskSynchronous() {
|
||||
return delegate.isDiskSynchronous();
|
||||
return this.delegate.isDiskSynchronous();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isManualStart() {
|
||||
return this.manualStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isParallel() {
|
||||
return delegate.isParallel();
|
||||
return this.delegate.isParallel();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isPaused() {
|
||||
return this.delegate.isPaused();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isPersistenceEnabled() {
|
||||
return this.delegate.isPersistenceEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public boolean isRunning() {
|
||||
return this.delegate.isRunning();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getAlertThreshold() {
|
||||
return this.delegate.getAlertThreshold();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getBatchSize() {
|
||||
return this.delegate.getBatchSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getBatchTimeInterval() {
|
||||
return this.delegate.getBatchTimeInterval();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public String getDiskStoreName() {
|
||||
return this.delegate.getDiskStoreName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getDispatcherThreads() {
|
||||
return delegate.getDispatcherThreads();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public GatewaySender.OrderPolicy getOrderPolicy() {
|
||||
return delegate.getOrderPolicy();
|
||||
public List<GatewayEventFilter> getGatewayEventFilters() {
|
||||
return this.delegate.getGatewayEventFilters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public GatewayEventSubstitutionFilter getGatewayEventSubstitutionFilter() {
|
||||
return this.delegate.getGatewayEventSubstitutionFilter();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public List<GatewayTransportFilter> getGatewayTransportFilters() {
|
||||
return this.delegate.getGatewayTransportFilters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public String getId() {
|
||||
return this.delegate.getId();
|
||||
}
|
||||
|
||||
public void setManualStart(boolean manualStart) {
|
||||
this.manualStart = manualStart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxParallelismForReplicatedRegion() {
|
||||
return delegate.getMaxParallelismForReplicatedRegion();
|
||||
}
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getMaxParallelismForReplicatedRegion() {
|
||||
return this.delegate.getMaxParallelismForReplicatedRegion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.delegate.toString();
|
||||
}
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getMaximumQueueMemory() {
|
||||
return this.delegate.getMaximumQueueMemory();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public GatewaySender.OrderPolicy getOrderPolicy() {
|
||||
return delegate.getOrderPolicy();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getRemoteDSId() {
|
||||
return this.delegate.getRemoteDSId();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getSocketBufferSize() {
|
||||
return this.delegate.getSocketBufferSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public int getSocketReadTimeout() {
|
||||
return this.delegate.getSocketReadTimeout();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void addGatewayEventFilter(GatewayEventFilter filter) {
|
||||
delegate.addGatewayEventFilter(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void removeGatewayEventFilter(GatewayEventFilter filter) {
|
||||
delegate.removeGatewayEventFilter(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void destroy() {
|
||||
this.delegate.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void pause() {
|
||||
delegate.pause();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void rebalance() {
|
||||
delegate.rebalance();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void resume() {
|
||||
delegate.resume();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void start() {
|
||||
delegate.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void stop() {
|
||||
delegate.stop();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.delegate.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user