Enum Class MaintenanceType

All Implemented Interfaces:
Serializable, Comparable<MaintenanceType>, java.lang.constant.Constable

public enum MaintenanceType extends Enum<MaintenanceType>
  • Enum Constant Details


      @Volatile public static final MaintenanceType REINDEX
      Use only in collaboration with Couchbase Support. (Runs SQLite `REINDEX`.)

      public static final MaintenanceType COMPACT
      Shrinks the database file by removing any empty pages, and deletes blobs that are no longer referenced by any documents. (Runs SQLite `PRAGMA incremental_vacuum; PRAGMA wal_checkpoint(TRUNCATE)`.)

      public static final MaintenanceType INTEGRITY_CHECK
      Checks for database corruption, as might be caused by a damaged filesystem, or memory corruption. (Runs SQLite `PRAGMA integrity_check`.)

      public static final MaintenanceType OPTIMIZE
      Quickly updates database statistics that may help optimize queries that have been run by this Database since it was opened. The more queries that have been run, the more effective this will be, but it tries to do its work quickly by scanning only portions of indexes. (Runs SQLite `PRAGMA analysis_limit=400; PRAGMA optimize`.)

      This operation is also performed automatically when a Database is closed.


      public static final MaintenanceType FULL_OPTIMIZE
      Fully scans all indexes to gather database statistics that help optimize queries. This may take some time, depending on the size of the indexes, but it doesn't have to be redone unless the database changes drastically, or new indexes are created. (Runs SQLite `PRAGMA analysis_limit=0; ANALYZE`.)
  • Method Details

    • values

      public static MaintenanceType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MaintenanceType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null