Examples of addInetSocketAddress()


Examples of com.hazelcast.client.ClientConfig.addInetSocketAddress()

    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

Examples of com.hazelcast.client.ClientConfig.addInetSocketAddress()

  @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

Examples of com.hazelcast.client.ClientConfig.addInetSocketAddress()

    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
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.