Skip to content

Commit 77fda50

Browse files
authored
CBL-7550 : Added shutdown for executor and okhttp (#93)
* CBL-7550 : Added shutdown for executor and okhttp * Added API Doc for shutdown * Updated the API Doc * Update the PostShutdown API Doc
1 parent c4cc4e8 commit 77fda50

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

java/lib/src/main/java/com/couchbase/lite/CouchbaseLite.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,25 @@ public static void init(boolean debug) {
7878
public static void init(boolean debug, @NonNull File rootDir, @NonNull File scratchDir) {
7979
CouchbaseLiteInternal.init(debug, rootDir, scratchDir);
8080
}
81+
82+
/**
83+
* Shuts down Couchbase Lite's shared executors.
84+
* Call when shutting down your application/container to allow clean JVM exit.
85+
*
86+
* <p>
87+
* This method releases shared executors used by Couchbase Lite.
88+
* It should be called when the host application or container is shutting down
89+
* to allow the process to terminate cleanly without being blocked by
90+
* active executors.
91+
* </p>
92+
*
93+
* <p>
94+
* After this call, internal shared executors are stopped and no longer perform work.
95+
* Couchbase Lite should not be used again until the process restarts.
96+
* </p>
97+
*
98+
*/
99+
public static void shutdown() {
100+
CouchbaseLiteInternal.shutdown();
101+
}
81102
}

0 commit comments

Comments
 (0)