Class Close


public final class Close extends Command
Evaluates the 'close' command and closes the current database.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • Close

      public Close()
      Default constructor.
  • Method Details

    • run

      protected boolean run()
      Description copied from class: Command
      Executes the command and serializes the result (internal call).
      Specified by:
      run in class Command
      Returns:
      success of operation
    • addLocks

      public void addLocks()
      Description copied from class: Job
      Adds the strings (databases, special identifiers) for which locks need to be acquired.
      Overrides:
      addLocks in class Job
    • close

      public static void close(Data data, Context ctx)
      Closes the specified database.
      Parameters:
      data - data reference
      ctx - database context
    • close

      public static boolean close(Context ctx)
      Closes a currently opened database.
      Parameters:
      ctx - database context
      Returns:
      true if no database was opened, or if database was closed