Package org.infinispan.client.hotrod.test

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


      });
   }

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


      });
   }

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

      });
   }

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

      });
   }

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

      });
   }

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

      });
   }

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

      });
   }

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

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

   }

   public void testNoEventsAfterRemovingListener() {
      final EventLogListener eventListener = new EventLogListener();
      final RemoteCache<Integer, String> rcache = remoteCacheManager.getCache();
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            rcache.put(1, "one");
            expectOnlyCreatedEvent(1, eventListener, 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

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.