This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch release/1.10.0 in repository https://gitbox.apache.org/repos/asf/geode.git
commit 6027b462eb193ed63f26c365daabf5301b2be4ba Author: nabarun <[email protected]> AuthorDate: Wed Sep 4 15:03:42 2019 -0700 GEODE-7126: Refactoring API names to be more consistent. * Names changed to be more consistent * Modified the comments explaining the APIs --- .../wan/asyncqueue/AsyncEventQueuePausedDUnitTest.java | 2 +- .../asyncqueue/AsyncEventQueueValidationsJUnitTest.java | 7 +++---- .../geode/cache/asyncqueue/AsyncEventQueueFactory.java | 2 +- .../asyncqueue/internal/AsyncEventQueueFactoryImpl.java | 14 +++++++------- .../geode/internal/cache/xmlcache/CacheCreation.java | 2 +- .../geode/internal/cache/xmlcache/CacheXmlParser.java | 2 +- .../internal/AsyncEventQueueFactoryImplTest.java | 4 ++-- .../org/apache/geode/cache/configuration/CacheConfig.java | 5 +++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueuePausedDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueuePausedDUnitTest.java index 385afca..62e9c38 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueuePausedDUnitTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueuePausedDUnitTest.java @@ -167,7 +167,7 @@ public class AsyncEventQueuePausedDUnitTest implements Serializable { private static void createRegionAndDispatchingPausedAEQ(AEQandRegionProperties props) { Cache cache = ClusterStartupRule.getCache(); cache.createAsyncEventQueueFactory() - .pauseEventDispatchingToListener() + .pauseEventDispatching() .setParallel(props.isParallel()) .setPersistent(isPersistent(props)) .create("aeqID", new MyAsyncEventListener()); diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java index 40dc59c..40e6d30 100644 --- a/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java +++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java @@ -82,10 +82,11 @@ public class AsyncEventQueueValidationsJUnitTest { cache = new CacheFactory().set(MCAST_PORT, "0").create(); AsyncEventQueueFactory fact = cache.createAsyncEventQueueFactory() .setParallel(isParallel) - .pauseEventDispatchingToListener() + .pauseEventDispatching() .setDispatcherThreads(5); AsyncEventQueue aeq = fact.create("aeqID", new org.apache.geode.internal.cache.wan.MyAsyncEventListener()); + assertTrue(aeq.isDispatchingPaused()); assertTrue(((AsyncEventQueueImpl) aeq).getSender().isPaused()); } @@ -95,12 +96,10 @@ public class AsyncEventQueueValidationsJUnitTest { cache = new CacheFactory().set(MCAST_PORT, "0").create(); AsyncEventQueueFactory fact = cache.createAsyncEventQueueFactory() .setParallel(isParallel) - .pauseEventDispatchingToListener() + .pauseEventDispatching() .setDispatcherThreads(5); AsyncEventQueue aeq = fact.create("aeqID", new org.apache.geode.internal.cache.wan.MyAsyncEventListener()); - assertTrue(aeq.isDispatchingPaused()); - assertTrue(((AsyncEventQueueImpl) aeq).getSender().isPaused()); aeq.resumeEventDispatching(); diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueFactory.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueFactory.java index 1a5145e..9a5236d 100644 --- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueFactory.java +++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueFactory.java @@ -153,7 +153,7 @@ public interface AsyncEventQueueFactory { * Pauses the dispatching of the queued events to the listener. * */ - AsyncEventQueueFactory pauseEventDispatchingToListener(); + AsyncEventQueueFactory pauseEventDispatching(); /** * Creates the <code>AsyncEventQueue</code>. It accepts Id of AsyncEventQueue and instance of diff --git a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java index 26f29ee..2c18476 100644 --- a/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java +++ b/geode-core/src/main/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java @@ -47,7 +47,7 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory { private final InternalCache cache; - private boolean pauseEventsDispatchingToListener = false; + private boolean pauseEventsDispatching = false; /** * Used internally to pass the attributes from this factory to the real GatewaySender it is @@ -162,7 +162,7 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory { if (cache instanceof CacheCreation) { asyncEventQueue = new AsyncEventQueueCreation(asyncQueueId, gatewaySenderAttributes, listener); - if (pauseEventsDispatchingToListener) { + if (pauseEventsDispatching) { ((AsyncEventQueueCreation) asyncEventQueue).setPauseEventDispatching(true); } ((CacheCreation) cache).addAsyncEventQueue(asyncEventQueue); @@ -177,7 +177,7 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory { AsyncEventQueueImpl asyncEventQueueImpl = new AsyncEventQueueImpl(sender, listener); asyncEventQueue = asyncEventQueueImpl; cache.addAsyncEventQueue(asyncEventQueueImpl); - if (pauseEventsDispatchingToListener) { + if (pauseEventsDispatching) { sender.setStartEventProcessorInPausedState(); } if (!gatewaySenderAttributes.isManualStart()) { @@ -278,13 +278,13 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory { } @Override - public AsyncEventQueueFactory pauseEventDispatchingToListener() { - pauseEventsDispatchingToListener = true; + public AsyncEventQueueFactory pauseEventDispatching() { + pauseEventsDispatching = true; return this; } @VisibleForTesting - protected boolean isPauseEventsDispatchingToListener() { - return pauseEventsDispatchingToListener; + protected boolean isPauseEventsDispatching() { + return pauseEventsDispatching; } } diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java index 5d7b77b..c514529 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java @@ -553,7 +553,7 @@ public class CacheCreation implements InternalCache { (AsyncEventQueueFactoryImpl) cache.createAsyncEventQueueFactory(); asyncQueueFactory.configureAsyncEventQueue(asyncEventQueueCreation); if (asyncEventQueueCreation.isDispatchingPaused()) { - asyncQueueFactory.pauseEventDispatchingToListener(); + asyncQueueFactory.pauseEventDispatching(); } AsyncEventQueue asyncEventQueue = cache.getAsyncEventQueue(asyncEventQueueCreation.getId()); diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java index 0c05836..4df4de5 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java @@ -2370,7 +2370,7 @@ public class CacheXmlParser extends CacheXml implements ContentHandler { factory.addGatewayEventFilter(gatewayEventFilter); } if (asyncEventChannelCreation.isDispatchingPaused()) { - factory.pauseEventDispatchingToListener(); + factory.pauseEventDispatching(); } factory.setGatewayEventSubstitutionListener( asyncEventChannelCreation.getGatewayEventSubstitutionFilter()); diff --git a/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImplTest.java b/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImplTest.java index 9535782..3c80634 100644 --- a/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImplTest.java +++ b/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/AsyncEventQueueFactoryImplTest.java @@ -47,9 +47,9 @@ public class AsyncEventQueueFactoryImplTest { @Test public void whenAsyncEventQueueIsStartedInPausedStateThenSenderMustBePaused() { asyncEventQueueFactory = new AsyncEventQueueFactoryImpl(cache); - asyncEventQueueFactory.pauseEventDispatchingToListener(); + asyncEventQueueFactory.pauseEventDispatching(); assertTrue( - ((AsyncEventQueueFactoryImpl) asyncEventQueueFactory).isPauseEventsDispatchingToListener()); + ((AsyncEventQueueFactoryImpl) asyncEventQueueFactory).isPauseEventsDispatching()); } /** diff --git a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java b/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java index f380846..4e8d192 100644 --- a/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java +++ b/geode-management/src/main/java/org/apache/geode/cache/configuration/CacheConfig.java @@ -1146,7 +1146,7 @@ public class CacheConfig { protected Boolean pauseEventProcessing; /** - * Gets the value of whether the processing of the events queued is paused or not + * Gets the value of whether the queue was created with paused processing of the events queued * * * @return {@link Boolean} - true if queue will be created with paused processing of the events @@ -1159,7 +1159,8 @@ public class CacheConfig { } /** - * Sets the value of whether the processing of the events queued is paused or not + * Sets the value of whether the queue will be created with paused processing of the events + * queued * * @param pauseEventProcessing {@link Boolean} - true if queue will be created with paused * processing of the events queued
