Package com.gemstone.gemfire.cache.asyncqueue

Examples of com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue


    factoryBean.setParallel(false);
    factoryBean.doInit();

    verifyExpectations(mockAsyncEventQueueFatory, factoryBean);

    AsyncEventQueue eventQueue = factoryBean.getObject();

    assertNotNull(eventQueue);
    assertEquals("789", eventQueue.getId());
  }
View Full Code Here


    factoryBean.setOrderPolicy("THREAD");
    factoryBean.doInit();

    verifyExpectations(mockAsyncEventQueueFatory, factoryBean);

    AsyncEventQueue eventQueue = factoryBean.getObject();

    assertNotNull(eventQueue);
    assertEquals("abc", eventQueue.getId());
  }
View Full Code Here

    factoryBean.setPersistent(false);
    factoryBean.doInit();

    verifyExpectations(mockAsyncEventQueueFactory, factoryBean);

    AsyncEventQueue evenQueue = factoryBean.getObject();

    assertNotNull(evenQueue);
    assertEquals("123abc", evenQueue.getId());
  }
View Full Code Here

    factoryBean.setDiskSynchronous(true);
    factoryBean.doInit();

    verifyExpectations(mockAsyncEventQueueFactory, factoryBean);

    AsyncEventQueue evenQueue = factoryBean.getObject();

    assertNotNull(evenQueue);
    assertEquals("12345", evenQueue.getId());
  }
View Full Code Here

    }
  }

  @Test
  public void testAsyncEventQueue() {
    AsyncEventQueue asyncEventQueue = ctx.getBean("async-event-queue", AsyncEventQueue.class);

    assertNotNull(asyncEventQueue);
    assertTrue(asyncEventQueue.isBatchConflationEnabled());
    assertEquals(10, asyncEventQueue.getBatchSize());
    assertEquals(3, asyncEventQueue.getBatchTimeInterval());
    assertEquals("diskstore", asyncEventQueue.getDiskStoreName());
    assertTrue(asyncEventQueue.isDiskSynchronous());
    assertEquals(50, asyncEventQueue.getMaximumQueueMemory());
    assertEquals(OrderPolicy.KEY, asyncEventQueue.getOrderPolicy());
    assertFalse(asyncEventQueue.isParallel());
    assertTrue(asyncEventQueue.isPersistent());
  }
View Full Code Here

    return mockCache;
  }

  protected AsyncEventQueueFactory createMockAsyncEventQueueFactory(final String asyncEventQueueId) {
    AsyncEventQueueFactory mockAsyncEventQueueFactory = mock(AsyncEventQueueFactory.class);
    AsyncEventQueue mockAsyncEventQueue = mock(AsyncEventQueue.class);

    when(mockAsyncEventQueue.getId()).thenReturn(asyncEventQueueId);
    when(mockAsyncEventQueueFactory.create(eq(asyncEventQueueId), notNull(AsyncEventListener.class)))
      .thenReturn(mockAsyncEventQueue);

    return mockAsyncEventQueueFactory;
  }
View Full Code Here

    factoryBean.setParallel(true);
    factoryBean.doInit();

    verifyExpectations(mockAsyncEventQueueFactory, factoryBean);

    AsyncEventQueue eventQueue = factoryBean.getObject();

    assertNotNull(eventQueue);
    assertEquals("000", eventQueue.getId());
  }
View Full Code Here

    factoryBean.setParallel(true);
    factoryBean.doInit();

    verifyExpectations(mockAsyncEventQueueFactory, factoryBean);

    AsyncEventQueue eventQueue = factoryBean.getObject();

    assertNotNull(eventQueue);
    assertEquals("123", eventQueue.getId());
  }
View Full Code Here

TOP

Related Classes of com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.