Package org.infinispan.client.hotrod.test

Examples of org.infinispan.client.hotrod.test.RemoteCacheManagerCallable


      });
   }

   public void testClearEvents() {
      final EventLogListener<Integer> eventListener = new EventLogListener<>();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            RemoteCache<Integer, String> cache = rcm.getCache();
            eventListener.expectNoEvents();
            cache.put(1, "one");
View Full Code Here


      eventListener.expectNoEvents();
      rcache.put(1, "newone");
      eventListener.expectNoEvents();
      rcache.remove(1);
      eventListener.expectNoEvents();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            RemoteCache<Integer, String> cache = rcm.getCache();
            cache.put(1, "one");
            eventListener.expectOnlyCreatedEvent(1, cache());
View Full Code Here

   }

   public void testNoEventsAfterRemovingListener() {
      final EventLogListener<Integer> eventListener = new EventLogListener<>();
      final RemoteCache<Integer, String> rcache = remoteCacheManager.getCache();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            rcache.put(1, "one");
            eventListener.expectOnlyCreatedEvent(1, cache());
            rcache.put(1, "newone");
View Full Code Here

   }

   public void testSetListeners() {
      final EventLogListener eventListener1 = new EventLogListener();
      final RemoteCache<Integer, String> rcache = remoteCacheManager.getCache();
      withClientListener(eventListener1, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            Set<Object> listeners = rcache.getListeners();
            assertEquals(1, listeners.size());
            assertEquals(eventListener1, listeners.iterator().next());
            final EventLogListener eventListener2 = new EventLogListener();
            withClientListener(eventListener2, new RemoteCacheManagerCallable(remoteCacheManager) {
               @Override
               public void call() {
                  Set<Object> listeners = rcache.getListeners();
                  assertEquals(2, listeners.size());
                  assertTrue(listeners.contains(eventListener1));
View Full Code Here

      assertEquals(0, listeners.size());
   }

   public void testCustomTypeEvents() {
      final EventLogListener<CustomKey> eventListener = new EventLogListener<>();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            RemoteCache<CustomKey, String> cache = rcm.getCache();
            eventListener.expectNoEvents();
            CustomKey key = new CustomKey(1);
View Full Code Here

      final WithStateEventLogListener<Integer> eventListener = new WithStateEventLogListener<>();
      RemoteCache<Integer, String> cache = remoteCacheManager.getCache();
      cache.put(1, "one");
      cache.put(2, "two");
      eventListener.expectNoEvents();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            eventListener.expectUnorderedEvents(ClientEvent.Type.CLIENT_CACHE_ENTRY_CREATED, 1, 2);
         }
      });
View Full Code Here

      final EventLogListener<Integer> eventListener = new EventLogListener<>();
      RemoteCache<Integer, String> cache = remoteCacheManager.getCache();
      cache.put(1, "one");
      cache.put(2, "two");
      eventListener.expectNoEvents();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            eventListener.expectNoEvents();
         }
      });
View Full Code Here

      return server;
   }

   public void testCustomEvents() {
      final StaticCustomEventLogListener eventListener = new StaticCustomEventLogListener();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            RemoteCache<Integer, String> cache = rcm.getCache();
            eventListener.expectNoEvents();
            cache.put(1, "one");
View Full Code Here

    * registered with a non-existing 'converterFactoryName'.
    */
   @Test(expectedExceptions = HotRodClientException.class)
   public void testNonExistingConverterFactoryCustomEvents() {
      NonExistingConverterFactoryListener eventListener = new NonExistingConverterFactoryListener();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager));
   }
View Full Code Here

      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager));
   }

   public void testParameterBasedConversion() {
      final DynamicCustomEventLogListener eventListener = new DynamicCustomEventLogListener();
      withClientListener(eventListener, null, new Object[]{2}, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            RemoteCache<Integer, String> cache = rcm.getCache();
            eventListener.expectNoEvents();
            cache.put(1, "one");
View Full Code Here

TOP

Related Classes of org.infinispan.client.hotrod.test.RemoteCacheManagerCallable

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.