/** * Enables / disables the clustering. * * @param cluster whether or not to start vert.x in clustered mode. */ @Option(longName = "cluster", acceptValue = false, flag = true) @Description("If specified then the vert.x instance will form a cluster with any other vert.x instances on the " + "network.") public void setCluster(boolean cluster) { this.cluster = cluster; }
/** * Sets the cluster host. * * @param host the cluster host */ @Option(longName = "cluster-host", argName = "host") @Description("host to bind to for cluster communication. If this is not specified vert.x will attempt to choose one" + " from the available interfaces.") public void setClusterHost(String host) { this.clusterHost = host; }
/** * Sets the cluster public host. * * @param host the host */ @Option(longName = "cluster-public-host", argName = "public-host") @Description("Public host to bind to for cluster communication. If not specified, Vert.x will use the same as cluster host.") public void setClusterPublicHost(String host) { this.clusterPublicHost = host; }
/** * Sets the main verticle that is deployed. * * @param verticle the verticle */ @Argument(index = 0, argName = "main-verticle", required = true) @Description("The main verticle to deploy, it can be a fully qualified class name or a file.") public void setMainVerticle(String verticle) { this.mainVerticle = verticle; }
/** * Sets the "application id" that would be to stop the application and be lsited in the {@code list} command. * * @param id the id */ @Option(longName = "vertx-id", shortName = "id", required = false, acceptValue = true) @Description("The id of the application, a random UUID by default") public void setApplicationId(String id) { this.id = id; }
/** * Sets the Java Virtual Machine options to pass to the spawned process. If not set, the JAVA_OPTS environment * variable is used. * * @param options the jvm options */ @Option(longName = "java-opts", required = false, acceptValue = true) @Description("Java Virtual Machine options to pass to the spawned process such as \"-Xmx1G -Xms256m " + "-XX:MaxPermSize=256m\". If not set the `JAVA_OPTS` environment variable is used.") public void setJavaOptions(String options) { this.jvmOptions = options; }
/** * As the {@code stop} command takes only a single argument, it's the application id. * * @param id the id. */ @Argument(index = 0, argName = "vertx.id", required = false) @Description("The vert.x application id") public void setApplicationId(String id) { this.id = id; }
/** * Whether or not the verticle is deployed as a worker verticle. * * @param worker {@code true} to deploy the verticle as worker, {@code false} otherwise */ @Option(longName = "worker", acceptValue = false) @Description("If specified then the verticle is a worker verticle.") public void setWorker(boolean worker) { this.worker = worker; }
/** * Enables / disables the high-availability. * * @param ha whether or not to enable the HA. */ @Option(longName = "ha", acceptValue = false, flag = true) @Description("If specified the verticle will be deployed as a high availability (HA) deployment. This means it can " + "fail over to any other nodes in the cluster started with the same HA group.") public void setHighAvailability(boolean ha) { this.ha = ha; }
@Option(longName = "on-redeploy", argName = "cmd") @Description("Optional shell command executed when a redeployment is triggered") public void setOnRedeployCommand(String command) { this.onRedeployCommand = command; }
/** * Sets the cluster port. * * @param port the port */ @Option(longName = "cluster-port", argName = "port") @Description("Port to use for cluster communication. Default is 0 which means choose a spare random port.") @DefaultValue("0") public void setClusterPort(int port) { this.clusterPort = port; }
/** * Sets the number of instance of the verticle to create. * * @param instances the number of instances */ @Option(longName = "instances", argName = "instances") @DefaultValue("1") @Description("Specifies how many instances of the verticle will be deployed. Defaults to 1.") public void setInstances(int instances) { this.instances = instances; }
/** * Sets the quorum option. * * @param quorum the quorum, default to 1. */ @Option(longName = "quorum", argName = "q") @Description("Used in conjunction with -ha this specifies the minimum number of nodes in the cluster for any HA " + "deploymentIDs to be active. Defaults to 1.") @DefaultValue("-1") public void setQuorum(int quorum) { this.quorum = quorum; }
/** * Sets the cluster public port. * * @param port the port */ @Option(longName = "cluster-public-port", argName = "public-port") @Description("Public port to use for cluster communication. Default is -1 which means same as cluster port.") @DefaultValue("-1") public void setClusterPublicPort(int port) { this.clusterPublicPort = port; }
@Option(longName = "redeploy-scan-period", argName = "period") @Description("When redeploy is enabled, this option configures the file system scanning period to detect file " + "changes. The time is given in milliseconds. 250 ms by default.") @DefaultValue("250") public void setRedeployScanPeriod(long period) { this.redeployScanPeriod = period; }
/** * Gets system properties passed in the user command line. The user can configure system properties using * {@code -Dkey=value}. * * @param props the properties */ @SuppressWarnings("unused") @Option(longName = "systemProperty", shortName = "D", argName = "key>=<value") @Description("Set a system property") @Hidden public void setSystemProps(List<String> props) { this.systemProperties = props; }
/** * Sets the HA group name. * * @param group the name of the group, default to {@code __DEFAULT__}. */ @Option(longName = "hagroup", argName = "group") @Description("used in conjunction with -ha this specifies the HA group this node will join. There can be multiple " + "HA groups in a cluster. Nodes will only failover to other nodes in the same group. Defaults to '__DEFAULT__'.") @DefaultValue("__DEFAULT__") public void setHAGroup(String group) { this.haGroup = group; }
@Option(longName = "redeploy", argName = "includes") @Description("Enable automatic redeployment of the application. This option takes a set on includes as parameter " + "indicating which files need to be watched. Patterns are separated by a comma.") @ParsedAsList public void setRedeploy(List<String> redeploy) { this.redeploy = redeploy; }
@Option(longName = "redeploy-grace-period", argName = "period") @Description("When redeploy is enabled, this option configures the grace period between 2 redeployments. The time " + "is given in milliseconds. 1000 ms by default.") @DefaultValue("1000") public void setRedeployGracePeriod(long period) { this.redeployGracePeriod = period; }
@Option(longName = "redeploy-termination-period", argName = "period") @Description("When redeploy is enabled, this option configures the time waited to be sure that the previous " + "version of the application has been stopped. It is useful on Windows, where the 'terminate' command may take time to be " + "executed.The time is given in milliseconds. 0 ms by default.") @DefaultValue("0") public void setRedeployStopWaitingTime(long period) { this.redeployTerminationPeriod = period; }