Class DbClearCLI

java.lang.Object
com.scivicslab.actoriac.cli.DbClearCLI
All Implemented Interfaces:
Callable<Integer>

public class DbClearCLI extends Object implements Callable<Integer>
CLI tool for clearing (deleting) the H2 log database files.

This command safely deletes the database files after checking that the log server is not running.

Usage examples:

# Clear the default database
java -jar actor-IaC.jar db-clear --db logs

# Force clear without checking log server
java -jar actor-IaC.jar db-clear --db logs --force
Since:
2.12.0
Author:
devteam@scivicslab.com
  • Field Details

  • Constructor Details

  • Method Details

    • main

      public static void main(String[] args)
      Main entry point for the db-clear CLI.
      Parameters:
      args - command line arguments
    • call

      public Integer call()
      Specified by:
      call in interface Callable<Integer>
    • isLogServerRunning

      private boolean isLogServerRunning()
      Checks if the log server is running by attempting to connect to the HTTP info endpoint.
      Returns:
      true if log server is running