Package org.voltdb.client.exampleutils

Examples of org.voltdb.client.exampleutils.ClientConnection


        @Override
        public void run()
        {
            // Each thread gets its dedicated connection, and posts requests against it.
            ClientConnection con = null;
            try
            {
                con = ClientConnectionPool.get(servers, port);
                long endTime = System.currentTimeMillis() + (1000l * this.duration);
                while (endTime > System.currentTimeMillis())
                {
                    try
                    {
                        con.execute(procedure, (long)rand.nextInt(this.poolSize), this.wait);
                        TrackingResults.incrementAndGet(0);
                    }
                    catch(Exception x)
                    {
                        TrackingResults.incrementAndGet(1);
                    }
                }
            }
            catch(Exception x)
            {
                System.err.println("Exception: " + x);
                x.printStackTrace();
            }
            finally
            {
                try { con.close(); } catch (Exception x) {}
            }
        }
View Full Code Here

TOP

Related Classes of org.voltdb.client.exampleutils.ClientConnection

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.