Examples of accepts()


Examples of joptsimple.OptionParser.accepts()

              .ofType(Integer.class);
        parser.accepts("working-dir", "The directory in which to store temporary data")
              .withRequiredArg()
              .describedAs("dir");
        parser.accepts("gzip", "Compress the intermediate temp files used in building the store");
        parser.accepts("request-file", "file get request ids from").withRequiredArg();
        parser.accepts("version",
                       "Version of read-only store [" + ReadOnlyStorageFormat.READONLY_V0 + ","
                               + ReadOnlyStorageFormat.READONLY_V1 + ","
                               + ReadOnlyStorageFormat.READONLY_V2 + " (default)]")
              .withRequiredArg()
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        parser.accepts("working-dir", "The directory in which to store temporary data")
              .withRequiredArg()
              .describedAs("dir");
        parser.accepts("gzip", "Compress the intermediate temp files used in building the store");
        parser.accepts("request-file", "file get request ids from").withRequiredArg();
        parser.accepts("version",
                       "Version of read-only store [" + ReadOnlyStorageFormat.READONLY_V0 + ","
                               + ReadOnlyStorageFormat.READONLY_V1 + ","
                               + ReadOnlyStorageFormat.READONLY_V2 + " (default)]")
              .withRequiredArg()
              .describedAs("version");
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

                       "Version of read-only store [" + ReadOnlyStorageFormat.READONLY_V0 + ","
                               + ReadOnlyStorageFormat.READONLY_V1 + ","
                               + ReadOnlyStorageFormat.READONLY_V2 + " (default)]")
              .withRequiredArg()
              .describedAs("version");
        parser.accepts("test-gz", "Path to gzip containing data. Works with --build only")
              .withRequiredArg()
              .describedAs("path");
        OptionSet options = parser.parse(args);

        if(options.has("help")) {
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

    private final boolean doReads;
    private final boolean doWrites;

    public static void main(String[] args) throws Exception {
        OptionParser parser = new OptionParser();
        parser.accepts("help", "print usage information");
        parser.acceptsAll(asList("r", "reads"), "Enable reads.");
        parser.acceptsAll(asList("w", "writes"), "Enable writes.");
        parser.acceptsAll(asList("d", "deletes"), "Enable deletes.");
        parser.accepts("table", "Table name").withRequiredArg();
        parser.accepts("db", "Database name").withRequiredArg();
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        OptionParser parser = new OptionParser();
        parser.accepts("help", "print usage information");
        parser.acceptsAll(asList("r", "reads"), "Enable reads.");
        parser.acceptsAll(asList("w", "writes"), "Enable writes.");
        parser.acceptsAll(asList("d", "deletes"), "Enable deletes.");
        parser.accepts("table", "Table name").withRequiredArg();
        parser.accepts("db", "Database name").withRequiredArg();
        parser.acceptsAll(asList("u", "user"), "DB username.").withRequiredArg();
        parser.acceptsAll(asList("P", "password"), "DB password").withRequiredArg();
        parser.acceptsAll(asList("p", "port"), "DB port").withRequiredArg();
        parser.acceptsAll(asList("h", "host"), "DB host").withRequiredArg();
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        parser.accepts("help", "print usage information");
        parser.acceptsAll(asList("r", "reads"), "Enable reads.");
        parser.acceptsAll(asList("w", "writes"), "Enable writes.");
        parser.acceptsAll(asList("d", "deletes"), "Enable deletes.");
        parser.accepts("table", "Table name").withRequiredArg();
        parser.accepts("db", "Database name").withRequiredArg();
        parser.acceptsAll(asList("u", "user"), "DB username.").withRequiredArg();
        parser.acceptsAll(asList("P", "password"), "DB password").withRequiredArg();
        parser.acceptsAll(asList("p", "port"), "DB port").withRequiredArg();
        parser.acceptsAll(asList("h", "host"), "DB host").withRequiredArg();
        parser.accepts("requests").withRequiredArg().ofType(Integer.class);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        parser.accepts("db", "Database name").withRequiredArg();
        parser.acceptsAll(asList("u", "user"), "DB username.").withRequiredArg();
        parser.acceptsAll(asList("P", "password"), "DB password").withRequiredArg();
        parser.acceptsAll(asList("p", "port"), "DB port").withRequiredArg();
        parser.acceptsAll(asList("h", "host"), "DB host").withRequiredArg();
        parser.accepts("requests").withRequiredArg().ofType(Integer.class);
        parser.accepts("request-file").withRequiredArg();
        parser.accepts("threads").withRequiredArg().ofType(Integer.class);
        OptionSet options = parser.parse(args);

        if(options.has("help")) {
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        parser.acceptsAll(asList("u", "user"), "DB username.").withRequiredArg();
        parser.acceptsAll(asList("P", "password"), "DB password").withRequiredArg();
        parser.acceptsAll(asList("p", "port"), "DB port").withRequiredArg();
        parser.acceptsAll(asList("h", "host"), "DB host").withRequiredArg();
        parser.accepts("requests").withRequiredArg().ofType(Integer.class);
        parser.accepts("request-file").withRequiredArg();
        parser.accepts("threads").withRequiredArg().ofType(Integer.class);
        OptionSet options = parser.parse(args);

        if(options.has("help")) {
            parser.printHelpOn(System.out);
View Full Code Here

Examples of joptsimple.OptionParser.accepts()

        parser.acceptsAll(asList("P", "password"), "DB password").withRequiredArg();
        parser.acceptsAll(asList("p", "port"), "DB port").withRequiredArg();
        parser.acceptsAll(asList("h", "host"), "DB host").withRequiredArg();
        parser.accepts("requests").withRequiredArg().ofType(Integer.class);
        parser.accepts("request-file").withRequiredArg();
        parser.accepts("threads").withRequiredArg().ofType(Integer.class);
        OptionSet options = parser.parse(args);

        if(options.has("help")) {
            parser.printHelpOn(System.out);
            System.exit(0);
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();
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.