Package com.hazelcast.client

Examples of com.hazelcast.client.ClientConfig


    return localMap == null ? new HashSet<V>() : localMap.values();
  }

  protected HazelcastClient getHazelcastClient(String ip) {

    ClientConfig clientConfig = new ClientConfig();

    clientConfig.addAddress(ip + ":" + E3Constant.HAZELCAST_PORT);
    HazelcastClient client = HazelcastClient.newHazelcastClient(clientConfig);

    return client;
  }
View Full Code Here


      else {
        logger.error("No HazelcastInstance found");
      }
    } else {

      ClientConfig clientConfig = new ClientConfig();
      clientConfig.addAddress(ip + ":" + E3Constant.HAZELCAST_PORT);
      client = HazelcastClient.newHazelcastClient(clientConfig);
     
      map = client.getMap(mapName);
    }
   
View Full Code Here

        // TODO log
        System.out.println("QueueHandler: HazelcastInstance not found");
      }
    } else {

      ClientConfig clientConfig = new ClientConfig();
      clientConfig.addAddress(ip + ":" + E3Constant.HAZELCAST_PORT);
      client = HazelcastClient.newHazelcastClient(clientConfig);
      queue = client.getQueue(queueName);
    }
  }
View Full Code Here

    Config cfg = new Config();
    cfg.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
    HazelcastInstance h1 = Hazelcast.newHazelcastInstance(cfg);

    // Connect a client to the cluster
    ClientConfig clientConfig = new ClientConfig() ;
    InetSocketAddress localMemberAddress = h1.getCluster().getLocalMember().getInetSocketAddress();
    clientConfig.addInetSocketAddress(localMemberAddress);
    HazelcastClient client = HazelcastClient.newHazelcastClient(clientConfig);

    // Add a key/value in the cluster using the client
    String mapName = "123";
    IMap<String, String> mapClient = client.getMap(mapName);
View Full Code Here

  }

  @Test
  public void testHazelcastJavaClient() throws UnknownHostException {
    // Connect a client to the cluster
    ClientConfig clientConfig = new ClientConfig() ;
    clientConfig.addInetSocketAddress(instance.getCluster().getLocalMember().getInetSocketAddress());
    HazelcastClient client = HazelcastClient.newHazelcastClient(clientConfig);

    // Check that the entry is not in the cache before the client add it
    assertNull(authCache.get("key1"));
View Full Code Here

    String bundleFilePath = getClass().getResource("/test.jar").getFile();
    File bundleFile = new File (bundleFilePath);

    // Connect a client to the cluster
    ClientConfig clientConfig = new ClientConfig() ;
    clientConfig.addInetSocketAddress(instance.getCluster().getLocalMember().getInetSocketAddress());
    HazelcastClient client = HazelcastClient.newHazelcastClient(clientConfig);

    // Get a reference on the remote routes
    IQueue<ProvisionRouteTask> provisionRouteQueue = client.getQueue("bundles-to-deploy");
    assertEquals(0, provisionRouteQueue.size());
View Full Code Here

TOP

Related Classes of com.hazelcast.client.ClientConfig

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.