Examples of connect()


Examples of com.linkedin.helix.HelixManager.connect()

    {
      manager = HelixManagerFactory.getZKHelixManager(CLUSTER_NAME,
                                                          "localhost_" + (START_PORT + 1),
                                                          InstanceType.PARTICIPANT,
                                                          ZK_ADDR);
      manager.connect();
      Assert.fail("Should fail on connect() since cluster structure is not set up");
    }
    catch(HelixException e)
    {
      // OK
View Full Code Here

Examples of com.linkedin.helix.ZkHelixTestManager.connect()

    ZkHelixTestManager controller =
        new ZkHelixTestManager(clusterName,
                                            "controller_0",
                                            InstanceType.CONTROLLER,
                                            ZK_ADDR);
    controller.connect();
    boolean result;
    result =
        ClusterStateVerifier.verifyByPolling(new ClusterStateVerifier.BestPossAndExtViewZkVerifier(ZK_ADDR,
                                                                                          clusterName));
    Assert.assertTrue(result);
View Full Code Here

Examples of com.linkedin.helix.manager.file.StaticFileHelixManager.connect()

    StaticFileHelixManager controller = new StaticFileHelixManager(clusterName, controllerName,
                                                     InstanceType.CONTROLLER, configFile);
    controller.disconnect();
    AssertJUnit.assertFalse(controller.isConnected());
    controller.connect();
    AssertJUnit.assertTrue(controller.isConnected());

    String sessionId = controller.getSessionId();
//    AssertJUnit.assertEquals(DynamicFileClusterManager._sessionId, sessionId);
    AssertJUnit.assertEquals(clusterName, controller.getClusterName());
View Full Code Here

Examples of com.mongodb.MongoURI.connect()

    }
   
    MongoURI uri = new MongoURI(inputUri);
    Mongo mongo = null;
    try {
      mongo = uri.connect();
    } catch (UnknownHostException e) {
      throw new IllegalStateException( " Unable to connect to MongoDB at '" + uri + "'", e);
    }
        DB db = mongo.getDB(uri.getDatabase());
        DBCollection coll = db.getCollection(uri.getCollection());
View Full Code Here

Examples of com.msoft.mail.provider.nntp.NNTPTransport.connect()

      // Null parameters are for user name and password
      statusPos++; // 10
      statusLine = "Connecting to mail server";
      status.setStatus( statusPos, statusLine );
      transport.connect( hostname, null, null );
     
      statusPos++; // 11
      statusLine = "Sending message";
      status.setStatus( statusPos, statusLine );     
      transport.sendMessage( message, message.getAllRecipients() );
View Full Code Here

Examples of com.mysql.clusterj.core.store.ClusterConnection.connect()

    protected ClusterConnection createClusterConnection(
            ClusterConnectionService service, Map<?, ?> props, int nodeId) {
        ClusterConnection result = null;
        try {
            result = service.create(CLUSTER_CONNECT_STRING, nodeId);
            result.connect(CLUSTER_CONNECT_RETRIES, CLUSTER_CONNECT_DELAY,true);
            result.waitUntilReady(CLUSTER_CONNECT_TIMEOUT_BEFORE,CLUSTER_CONNECT_TIMEOUT_AFTER);
        } catch (Exception ex) {
            // need to clean up if some connections succeeded
            for (ClusterConnection connection: pooledConnections) {
                connection.close();
View Full Code Here

Examples of com.mysql.jdbc.Driver.connect()

    Properties properties = new Properties();   
    properties.load(new FileInputStream(CONFIG_FILE));
        
    Driver driver = (Driver) Class.forName(properties.getProperty("driver")).newInstance();
    String url = properties.getProperty("url");   
    return driver.connect(url, properties);
  }       

 
  /**
   * Execute the given sql script.
View Full Code Here

Examples of com.mysql.jdbc.NonRegisteringDriver.connect()

      slaveUrl.append(slaveDb);
    }

    slaveProperties.setProperty("roundRobinLoadBalance", "true");

    this.masterConnection = (LoadBalancedMySQLConnection) driver.connect(masterUrl.toString(), masterProperties);

    if (StringUtils.isBlank(slaveHost) && slaveUrl.toString().contains("///")) {
      info(" ----- the salveUrl contains the '///', that means there is no slaver, make slavesConnection = masterConnection --");
      slavesConnection = masterConnection;
    } else {
View Full Code Here

Examples of com.mysql.jdbc.ReplicationDriver.connect()

    // Looks like a normal MySQL JDBC url, with a
    // comma-separated list of hosts, the first
    // being the 'master', the rest being any number
    // of slaves that the driver will load balance against
    //
    conn = driver.connect(url, props);
  }

  static void testMasterSlaves() throws Exception {
    //
    // Perform read/write work on the master
View Full Code Here

Examples of com.mysql.jdbc.SocketFactory.connect()

        if (path != null) {
          hostSpecificProps.setProperty("junixsocket.file", path);
        }

        return new HangingSocket(factory.connect(hostnameToConnectTo,
            portNumber, hostSpecificProps), props, hostname);
      }

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