Search in sources :

Example 1 with AbstractGatewaySender

use of org.apache.geode.internal.cache.wan.AbstractGatewaySender in project geode by apache.

the class ConcurrentSerialGatewaySenderOperationsDUnitTest method verifySenderResumedState.

public static void verifySenderResumedState(String senderId) {
    Set<GatewaySender> senders = cache.getGatewaySenders();
    AbstractGatewaySender sender = null;
    for (GatewaySender s : senders) {
        if (s.getId().equals(senderId)) {
            sender = (AbstractGatewaySender) s;
            break;
        }
    }
    assertFalse(sender.isPaused());
    assertTrue(sender.isRunning());
}
Also used : GatewaySender(org.apache.geode.cache.wan.GatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender)

Example 2 with AbstractGatewaySender

use of org.apache.geode.internal.cache.wan.AbstractGatewaySender in project geode by apache.

the class ConcurrentSerialGatewaySenderOperationsDUnitTest method verifySenderStoppedState.

public static void verifySenderStoppedState(String senderId) {
    Set<GatewaySender> senders = cache.getGatewaySenders();
    AbstractGatewaySender sender = null;
    for (GatewaySender s : senders) {
        if (s.getId().equals(senderId)) {
            sender = (AbstractGatewaySender) s;
            break;
        }
    }
    assertFalse(sender.isRunning());
    assertFalse(sender.isPaused());
}
Also used : GatewaySender(org.apache.geode.cache.wan.GatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender)

Example 3 with AbstractGatewaySender

use of org.apache.geode.internal.cache.wan.AbstractGatewaySender in project geode by apache.

the class ConcurrentSerialGatewaySenderOperationsDUnitTest method verifySenderPausedState.

public static void verifySenderPausedState(String senderId) {
    Set<GatewaySender> senders = cache.getGatewaySenders();
    AbstractGatewaySender sender = null;
    for (GatewaySender s : senders) {
        if (s.getId().equals(senderId)) {
            sender = (AbstractGatewaySender) s;
            break;
        }
    }
    assertTrue(sender.isPaused());
}
Also used : GatewaySender(org.apache.geode.cache.wan.GatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender)

Example 4 with AbstractGatewaySender

use of org.apache.geode.internal.cache.wan.AbstractGatewaySender in project geode by apache.

the class ConcurrentSerialGatewaySenderOperationsDUnitTest method verifyGatewaySenderOperations.

public static void verifyGatewaySenderOperations(String senderId) {
    Set<GatewaySender> senders = cache.getGatewaySenders();
    GatewaySender sender = null;
    for (GatewaySender s : senders) {
        if (s.getId().equals(senderId)) {
            sender = s;
            break;
        }
    }
    assertFalse(sender.isPaused());
    assertFalse(((AbstractGatewaySender) sender).isRunning());
    sender.pause();
    sender.resume();
    sender.stop();
}
Also used : GatewaySender(org.apache.geode.cache.wan.GatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender)

Example 5 with AbstractGatewaySender

use of org.apache.geode.internal.cache.wan.AbstractGatewaySender in project geode by apache.

the class ConcurrentParallelGatewaySenderDUnitTest method setTestHook.

public static void setTestHook(String senderId, boolean hook) {
    Set<GatewaySender> senders = cache.getGatewaySenders();
    GatewaySender sender = null;
    for (GatewaySender s : senders) {
        if (s.getId().equals(senderId)) {
            sender = s;
            break;
        }
    }
    ConcurrentParallelGatewaySenderEventProcessor cProc = (ConcurrentParallelGatewaySenderEventProcessor) ((AbstractGatewaySender) sender).getEventProcessor();
    if (cProc == null)
        return;
    cProc.TEST_HOOK = hook;
}
Also used : GatewaySender(org.apache.geode.cache.wan.GatewaySender) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender) ConcurrentParallelGatewaySenderEventProcessor(org.apache.geode.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderEventProcessor)

Aggregations

AbstractGatewaySender (org.apache.geode.internal.cache.wan.AbstractGatewaySender)40 GatewaySender (org.apache.geode.cache.wan.GatewaySender)23 AttributesFactory (org.apache.geode.cache.AttributesFactory)6 ConcurrentParallelGatewaySenderQueue (org.apache.geode.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderQueue)6 IgnoredException (org.apache.geode.test.dunit.IgnoredException)6 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)6 Test (org.junit.Test)6 RegionQueue (org.apache.geode.internal.cache.RegionQueue)5 Properties (java.util.Properties)4 Set (java.util.Set)4 Region (org.apache.geode.cache.Region)4 GatewayEventFilter (org.apache.geode.cache.wan.GatewayEventFilter)4 GatewaySenderFactory (org.apache.geode.cache.wan.GatewaySenderFactory)4 GatewayTransportFilter (org.apache.geode.cache.wan.GatewayTransportFilter)4 MyGatewayEventFilter1 (org.apache.geode.cache30.MyGatewayEventFilter1)4 MyGatewayTransportFilter1 (org.apache.geode.cache30.MyGatewayTransportFilter1)4 HashMap (java.util.HashMap)3 Map (java.util.Map)3 AsyncEventQueueImpl (org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueImpl)3 MyGatewayTransportFilter2 (org.apache.geode.cache30.MyGatewayTransportFilter2)3