Search in sources :

Example 1 with MetaRegionFactory

use of org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.MetaRegionFactory in project geode by apache.

the class ParallelGatewaySenderQueueJUnitTest method createParallelGatewaySenderQueue.

@Before
public void createParallelGatewaySenderQueue() {
    cache = mock(GemFireCacheImpl.class);
    sender = mock(AbstractGatewaySender.class);
    CancelCriterion cancelCriterion = mock(CancelCriterion.class);
    when(sender.getCancelCriterion()).thenReturn(cancelCriterion);
    when(sender.getCache()).thenReturn(cache);
    when(sender.getMaximumQueueMemory()).thenReturn(100);
    when(sender.getLifeCycleLock()).thenReturn(new ReentrantReadWriteLock());
    metaRegionFactory = mock(MetaRegionFactory.class);
    queue = new ParallelGatewaySenderQueue(sender, Collections.emptySet(), 0, 1, metaRegionFactory);
}
Also used : CancelCriterion(org.apache.geode.CancelCriterion) GemFireCacheImpl(org.apache.geode.internal.cache.GemFireCacheImpl) AbstractGatewaySender(org.apache.geode.internal.cache.wan.AbstractGatewaySender) ReentrantReadWriteLock(java.util.concurrent.locks.ReentrantReadWriteLock) MetaRegionFactory(org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.MetaRegionFactory) Before(org.junit.Before)

Aggregations

ReentrantReadWriteLock (java.util.concurrent.locks.ReentrantReadWriteLock)1 CancelCriterion (org.apache.geode.CancelCriterion)1 GemFireCacheImpl (org.apache.geode.internal.cache.GemFireCacheImpl)1 AbstractGatewaySender (org.apache.geode.internal.cache.wan.AbstractGatewaySender)1 MetaRegionFactory (org.apache.geode.internal.cache.wan.parallel.ParallelGatewaySenderQueue.MetaRegionFactory)1 Before (org.junit.Before)1