Examples of RemoteCacheManagerCallable


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

      final FilteredEventLogListener eventListener = new FilteredEventLogListener();
      filterFactory.dynamic = false;
      RemoteCache<Integer, String> cache = remoteCacheManager.getCache();
      cache.put(1, "one");
      cache.put(2, "two");
      withClientListener(eventListener, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            expectOnlyCreatedEvent(2, eventListener, cache());
            RemoteCache<Integer, String> cache = rcm.getCache();
            cache.remove(1);
            cache.remove(2);
            expectOnlyRemovedEvent(2, eventListener, cache());
         }
      });
      filterFactory.dynamic = true;
      cache.put(1, "one");
      cache.put(2, "two");
      cache.put(3, "three");
      withClientListener(eventListener, new Object[]{3}, null, new RemoteCacheManagerCallable(remoteCacheManager) {
         @Override
         public void call() {
            expectOnlyCreatedEvent(3, eventListener, cache());
            RemoteCache<Integer, String> cache = rcm.getCache();
            cache.remove(1);
View Full Code Here

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

      HotRodServer hotRodServer2 = server(1);
      props.put("infinispan.client.hotrod.server_list",
            "localhost:" + hotRodServer2.getPort() + ";localhost:" + hotRodServer2.getPort());
      props.put("infinispan.client.hotrod.ping_on_startup", "true");

      withRemoteCacheManager(new RemoteCacheManagerCallable(
            new RemoteCacheManager(props)) {
         @Override
         public void call() {
            TcpTransportFactory tcpConnectionFactory = (TcpTransportFactory)
                  TestingUtil.extractField(rcm, "transportFactory");
View Full Code Here

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

      HotRodServer hotRodServer2 = server(1);
      props.put("infinispan.client.hotrod.server_list",
            "localhost:" + hotRodServer2.getPort());
      props.put("infinispan.client.hotrod.ping_on_startup", "false");

      withRemoteCacheManager(new RemoteCacheManagerCallable(
            new RemoteCacheManager(props)) {
         @Override
         public void call() {
            TcpTransportFactory tcpConnectionFactory = (TcpTransportFactory)
                  TestingUtil.extractField(rcm, "transportFactory");
View Full Code Here

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

   public void testGetCacheWithPingOnStartupDisabledSingleNode() {
      Properties props = new Properties();
      props.put("infinispan.client.hotrod.server_list", "boomoo:12345");
      props.put("infinispan.client.hotrod.ping_on_startup", "false");

      withRemoteCacheManager(new RemoteCacheManagerCallable(
            new RemoteCacheManager(props)) {
         @Override
         public void call() {
            rcm.getCache();
         }
View Full Code Here

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

      HotRodServer hotRodServer2 = server(1);
      props.put("infinispan.client.hotrod.server_list",
            "boomoo:12345;localhost:" + hotRodServer2.getPort());
      props.put("infinispan.client.hotrod.ping_on_startup", "false");

      withRemoteCacheManager(new RemoteCacheManagerCallable(
            new RemoteCacheManager(props)) {
         @Override
         public void call() {
            RemoteCache<Object, Object> cache = rcm.getCache();
            assertFalse(cache.containsKey("k"));
View Full Code Here

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

      HotRodServer hotRodServer2 = server(1);
      props.put("infinispan.client.hotrod.server_list",
            "boomoo:12345;localhost:" + hotRodServer2.getPort());
      props.put("infinispan.client.hotrod.ping_on_startup", "true");

      withRemoteCacheManager(new RemoteCacheManagerCallable(
            new RemoteCacheManager(props)) {
         @Override
         public void call() {
            rcm.getCache();
         }
View Full Code Here

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

      Properties props = new Properties();
      HotRodServer hotRodServer2 = server(1);
      props.put("infinispan.client.hotrod.server_list",
            "localhost:" + hotRodServer2.getPort());
      props.put("infinispan.client.hotrod.ping_on_startup", "true");
      withRemoteCacheManager(new RemoteCacheManagerCallable(
            new RemoteCacheManager(props)) {
         @Override
         public void call() {
            rcm.getCache();
         }
View Full Code Here

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

                  hotRodCacheConfiguration())) {
         @Override
         public void call() {
            HotRodServer hotrodServer = TestHelper.startHotRodServer(cm);
            try {
               withRemoteCacheManager(new RemoteCacheManagerCallable(
                     new RemoteCacheManager("localhost", hotrodServer.getPort())) {
                  @Override
                  public void call() {
                     RemoteCache remoteCache = rcm.getCache();
                     remoteCache.put("k","v");
View Full Code Here

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

                  hotRodCacheConfiguration())) {
         @Override
         public void call() {
            HotRodServer hotrodServer = TestHelper.startHotRodServer(cm);
            try {
               withRemoteCacheManager(new RemoteCacheManagerCallable(
                     new RemoteCacheManager("localhost", hotrodServer.getPort())) {
                  @Override
                  public void call() {
                     RemoteCache remoteCache = rcm.getCache();
                     remoteCache.put("k","v");
View Full Code Here

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

@Test(groups = "functional", testName = "client.hotrod.event.ClientEventsTest")
public class ClientEventsTest extends SingleHotRodServerTest {

   public void testCreatedEvent() {
      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
TOP
Copyright © 2018 www.massapi.com. 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.