Examples of CTConnectionFactory


Examples of com.thinkaurelius.titan.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory

        int maxTotalConnections = config.getInt(
                GraphDatabaseConfiguration.CONNECTION_POOL_SIZE_KEY,
                GraphDatabaseConfiguration.CONNECTION_POOL_SIZE_DEFAULT);

        CTConnectionFactory factory = new CTConnectionFactory(hostnames, port, username, password, thriftTimeoutMS, thriftFrameSize);
        CTConnectionPool p = new CTConnectionPool(factory);
        p.setTestOnBorrow(true);
        p.setTestOnReturn(true);
        p.setTestWhileIdle(false);
        p.setWhenExhaustedAction(GenericKeyedObjectPool.WHEN_EXHAUSTED_BLOCK);
View Full Code Here

Examples of com.thinkaurelius.titan.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory

            throw new TitanException(e);
        }
    }

    public void waitForClusterSize(int minSize) throws InterruptedException, StorageException {
        CTConnectionFactory f = new CTConnectionFactory(new String[]{ address }, port,
                null, null, // username, password
                GraphDatabaseConfiguration.CONNECTION_TIMEOUT_DEFAULT,
                AbstractCassandraStoreManager.THRIFT_DEFAULT_FRAME_SIZE);
        CTConnection conn = null;
        try {
            conn = f.makeRawConnection();
            CTConnectionFactory.waitForClusterSize(conn.getClient(), minSize);
        } catch (TTransportException e) {
            throw new TemporaryStorageException(e);
        } finally {
            if (null != conn)
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.