Package joptsimple

Examples of joptsimple.OptionSet.valueOf()


        int requests = Integer.parseInt(nonOptions.get(2));
        int keySize = CmdUtils.valueOf(options, "k", 128);
        int valueSize = CmdUtils.valueOf(options, "v", 256);
        int workers = CmdUtils.valueOf(options, "threads", MAX_WORKERS);
        String postfix = (String) (options.has("p") ? options.valueOf("p") : null);
        RemoteDataGenerator rdg = new RemoteDataGenerator(url, storeName, workers);
        rdg.generateData(requests, keySize, valueSize, postfix);
    }
}
View Full Code Here


        Integer connsTotal = CmdUtils.valueOf(options, CONNECTIONS, 100);
        Integer reqs = CmdUtils.valueOf(options, REQS, 1000);

        ClientConfig config = new ClientConfig();
        if(options.has(CONNECTION_TIMEOUT))
            config.setConnectionTimeout((Integer) options.valueOf(CONNECTION_TIMEOUT),
                                        TimeUnit.MILLISECONDS);
        if(options.has(ROUTING_TIMEOUT))
            config.setTimeoutConfig(new TimeoutConfig(TimeUnit.MILLISECONDS.toMillis((Integer) options.valueOf(ROUTING_TIMEOUT)),
                                                      false));
View Full Code Here

        ClientConfig config = new ClientConfig();
        if(options.has(CONNECTION_TIMEOUT))
            config.setConnectionTimeout((Integer) options.valueOf(CONNECTION_TIMEOUT),
                                        TimeUnit.MILLISECONDS);
        if(options.has(ROUTING_TIMEOUT))
            config.setTimeoutConfig(new TimeoutConfig(TimeUnit.MILLISECONDS.toMillis((Integer) options.valueOf(ROUTING_TIMEOUT)),
                                                      false));

        if(options.has(SOCKET_TIMEOUT))
            config.setSocketTimeout((Integer) options.valueOf(SOCKET_TIMEOUT),
                                    TimeUnit.MILLISECONDS);
View Full Code Here

        if(options.has(ROUTING_TIMEOUT))
            config.setTimeoutConfig(new TimeoutConfig(TimeUnit.MILLISECONDS.toMillis((Integer) options.valueOf(ROUTING_TIMEOUT)),
                                                      false));

        if(options.has(SOCKET_TIMEOUT))
            config.setSocketTimeout((Integer) options.valueOf(SOCKET_TIMEOUT),
                                    TimeUnit.MILLISECONDS);
        if(options.has(MAX_CONNECTIONS))
            config.setMaxConnectionsPerNode((Integer) options.valueOf(MAX_CONNECTIONS));
        if(options.has(MAX_THREADS))
            config.setMaxThreads((Integer) options.valueOf(MAX_THREADS));
View Full Code Here

        if(options.has(SOCKET_TIMEOUT))
            config.setSocketTimeout((Integer) options.valueOf(SOCKET_TIMEOUT),
                                    TimeUnit.MILLISECONDS);
        if(options.has(MAX_CONNECTIONS))
            config.setMaxConnectionsPerNode((Integer) options.valueOf(MAX_CONNECTIONS));
        if(options.has(MAX_THREADS))
            config.setMaxThreads((Integer) options.valueOf(MAX_THREADS));
        if(options.has(SELECTORS))
            config.setSelectors((Integer) options.valueOf(SELECTORS));
        if(options.has(SOCKET_BUFFER_SIZE))
View Full Code Here

            config.setSocketTimeout((Integer) options.valueOf(SOCKET_TIMEOUT),
                                    TimeUnit.MILLISECONDS);
        if(options.has(MAX_CONNECTIONS))
            config.setMaxConnectionsPerNode((Integer) options.valueOf(MAX_CONNECTIONS));
        if(options.has(MAX_THREADS))
            config.setMaxThreads((Integer) options.valueOf(MAX_THREADS));
        if(options.has(SELECTORS))
            config.setSelectors((Integer) options.valueOf(SELECTORS));
        if(options.has(SOCKET_BUFFER_SIZE))
            config.setSocketBufferSize((Integer) options.valueOf(SOCKET_BUFFER_SIZE));
        config.setBootstrapUrls(url);
View Full Code Here

        if(options.has(MAX_CONNECTIONS))
            config.setMaxConnectionsPerNode((Integer) options.valueOf(MAX_CONNECTIONS));
        if(options.has(MAX_THREADS))
            config.setMaxThreads((Integer) options.valueOf(MAX_THREADS));
        if(options.has(SELECTORS))
            config.setSelectors((Integer) options.valueOf(SELECTORS));
        if(options.has(SOCKET_BUFFER_SIZE))
            config.setSocketBufferSize((Integer) options.valueOf(SOCKET_BUFFER_SIZE));
        config.setBootstrapUrls(url);

        ClientConnectionStressTest test = new ClientConnectionStressTest(config,
View Full Code Here

        if(options.has(MAX_THREADS))
            config.setMaxThreads((Integer) options.valueOf(MAX_THREADS));
        if(options.has(SELECTORS))
            config.setSelectors((Integer) options.valueOf(SELECTORS));
        if(options.has(SOCKET_BUFFER_SIZE))
            config.setSocketBufferSize((Integer) options.valueOf(SOCKET_BUFFER_SIZE));
        config.setBootstrapUrls(url);

        ClientConnectionStressTest test = new ClientConnectionStressTest(config,
                                                                         storeName,
                                                                         config.getMaxThreads(),
View Full Code Here

                                                                                                   : null);

        if(options.has("f"))
            adminTest.testFetch(nodePartitions);
        if(options.has("fu"))
            adminTest.testFetchAndUpdate(nodePartitions, (Integer) options.valueOf("fu"));
    }
}
View Full Code Here

            }

            CmdUtils.croakIfMissing(parser, options, "requests");

            final int numThreads = CmdUtils.valueOf(options, "threads", 10);
            final int numRequests = (Integer) options.valueOf("requests");
            final int numValues = (Integer) options.valueOf("num-values");
            final int valueSize = CmdUtils.valueOf(options, "value-size", 1024);
            final int cacheWidth = CmdUtils.valueOf(options, "cache-width", 100000);
            final double cacheHitRatio = CmdUtils.valueOf(options, "cache-hit-ratio", 0.5);
            final String propsFile = (String) options.valueOf("props");
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.