Package com.alibaba.otter.shared.communication.core.impl.connection

Examples of com.alibaba.otter.shared.communication.core.impl.connection.CommunicationConnectionPoolFactory.createConnection()


        CommunicationConnection last = null;
        for (int i = 0; i < 11; i++) {
            CommunicationConnection connection = null;
            try {
                connection = poolFactory.createConnection(param);
                connection.call(new PoolEvent(PoolEventType.pool));
                last = connection;
                if (last != null) { // 检查链接是否是重用
                    want.object(last).isEqualTo(connection);
                }
View Full Code Here


        ExecutorService executor = Executors.newCachedThreadPool();
        long start = System.currentTimeMillis();
        final CountDownLatch count = new CountDownLatch(11);
        for (int i = 0; i < 11; i++) {
            final CommunicationConnection connection = poolFactory.createConnection(param);
            final PoolEvent event = new PoolEvent(PoolEventType.exhaust);
            event.setSleep(1000);
            executor.submit(new Callable() {

                public Object call() throws Exception {
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.