Class CouchbaseLite


  • public final class CouchbaseLite
    extends java.lang.Object
    CouchbaseLite Utility
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void init()
      Initialize CouchbaseLite library.
      static void init​(boolean debug)
      Initialize CouchbaseLite library.
      static void init​(boolean debug, java.io.File rootDir, java.io.File scratchDir)
      Initialize CouchbaseLite library.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • init

        public static void init()
        Initialize CouchbaseLite library. This method MUST be called before using CouchbaseLite.

        This method expects the current directory to be writeable and will throw an IllegalStateException if it is not. Use init(boolean, File, File) to specify alternative root and scratch directories.

        Throws:
        java.lang.IllegalStateException - on initialization failure
      • init

        public static void init​(boolean debug)
        Initialize CouchbaseLite library. This method MUST be called before using CouchbaseLite.

        This method expects the current directory to be writeable and will throw an IllegalStateException if it is not. Use init(boolean, File, File) to specify alternative root and scratch directories.

        Parameters:
        debug - true if debugging
        Throws:
        java.lang.IllegalStateException - on initialization failure
      • init

        public static void init​(boolean debug,
                                @NonNull
                                java.io.File rootDir,
                                @NonNull
                                java.io.File scratchDir)
        Initialize CouchbaseLite library. This method MUST be called before using CouchbaseLite.

        This method allows specifying a default root directory for database files, and the scratch directory used for temporary files (the native library, etc). Both directories must be writable by this process.

        Parameters:
        debug - true if debugging
        rootDir - default directory for databases
        scratchDir - scratch directory for SQLite
        Throws:
        java.lang.IllegalStateException - on initialization failure