Examples of accepts()


Examples of joptsimple.OptionParser.accepts()

    @SuppressWarnings("unchecked")
    public static void main(String[] args) throws IOException {
        OptionParser parser = new OptionParser();
        parser.accepts("k", "key size").withRequiredArg().ofType(Integer.class);
        parser.accepts("v", "value size").withRequiredArg().ofType(Integer.class);
        parser.accepts("p", "prefix").withRequiredArg();

        OptionSet options = parser.parse(args);
        List<String> nonOptions = (List<String>) options.nonOptionArguments();
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

    @SuppressWarnings("unchecked")
    public static void main(String[] args) throws IOException {
        OptionParser parser = new OptionParser();
        parser.accepts("k", "key size").withRequiredArg().ofType(Integer.class);
        parser.accepts("v", "value size").withRequiredArg().ofType(Integer.class);
        parser.accepts("p", "prefix").withRequiredArg();

        OptionSet options = parser.parse(args);
        List<String> nonOptions = (List<String>) options.nonOptionArguments();

        if(nonOptions.size() != 3) {
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

    @SuppressWarnings("unchecked")
    public static void main(String[] args) throws Exception {

        OptionParser parser = new OptionParser();
        parser.accepts(CONNECTION_TIMEOUT, "Connection timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(ROUTING_TIMEOUT, "Routing timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        OptionParser parser = new OptionParser();
        parser.accepts(CONNECTION_TIMEOUT, "Connection timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(ROUTING_TIMEOUT, "Routing timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(SOCKET_TIMEOUT, "Socket timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(ROUTING_TIMEOUT, "Routing timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(SOCKET_TIMEOUT, "Socket timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_CONNECTIONS, "Max connections per node")
              .withRequiredArg()
              .ofType(Integer.class);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(SOCKET_TIMEOUT, "Socket timeout (ms)")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_CONNECTIONS, "Max connections per node")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_CONNECTIONS_TOTAL, "Max total connections")
              .withRequiredArg()
              .ofType(Integer.class);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_CONNECTIONS, "Max connections per node")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_CONNECTIONS_TOTAL, "Max total connections")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_THREADS, "Max threads").withRequiredArg().ofType(Integer.class);
        parser.accepts(SELECTORS, "Number of NIO selectors")
              .withRequiredArg()
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_CONNECTIONS_TOTAL, "Max total connections")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_THREADS, "Max threads").withRequiredArg().ofType(Integer.class);
        parser.accepts(SELECTORS, "Number of NIO selectors")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(SOCKET_BUFFER_SIZE, "Socket buffer size")
              .withRequiredArg()
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .ofType(Integer.class);
        parser.accepts(MAX_CONNECTIONS_TOTAL, "Max total connections")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(MAX_THREADS, "Max threads").withRequiredArg().ofType(Integer.class);
        parser.accepts(SELECTORS, "Number of NIO selectors")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(SOCKET_BUFFER_SIZE, "Socket buffer size")
              .withRequiredArg()
              .ofType(Integer.class);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

              .ofType(Integer.class);
        parser.accepts(MAX_THREADS, "Max threads").withRequiredArg().ofType(Integer.class);
        parser.accepts(SELECTORS, "Number of NIO selectors")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(SOCKET_BUFFER_SIZE, "Socket buffer size")
              .withRequiredArg()
              .ofType(Integer.class);
        parser.accepts(REQS, "Requests per session").withRequiredArg().ofType(Integer.class);
        parser.accepts(CONNECTIONS, "Total connections to make")
              .withRequiredArg()
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.