After initialization, call execute to start the post job. This method delegates to the correct mode method.
(String mode)
| 325 | * mode method. |
| 326 | */ |
| 327 | public void execute(String mode) throws SolrServerException, IOException { |
| 328 | final RTimer timer = new RTimer(); |
| 329 | switch (mode) { |
| 330 | case PostTool.DATA_MODE_FILES -> doFilesMode(); |
| 331 | case DATA_MODE_ARGS -> doArgsMode(args); |
| 332 | case PostTool.DATA_MODE_WEB -> doWebMode(); |
| 333 | case DATA_MODE_STDIN -> doStdinMode(); |
| 334 | case null -> { |
| 335 | return; |
| 336 | } |
| 337 | default -> { |
| 338 | return; |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | if (optimize) { |
| 343 | // optimize does a commit under the covers. |
| 344 | optimize(); |
| 345 | } else if (commit) { |
| 346 | commit(); |
| 347 | } |
| 348 | displayTiming((long) timer.getTime()); |
| 349 | } |
| 350 | |
| 351 | private void doFilesMode() throws IOException { |
| 352 | currentDepth = 0; |
no test coverage detected