This repository was archived by the owner on Jan 31, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
algoliasearch/src/offline/java/com/algolia/search/saas Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -615,6 +615,17 @@ public void run()
615
615
// Bootstrapping
616
616
// ----------------------------------------------------------------------
617
617
618
+ /**
619
+ * Test if this index has offline data on disk.
620
+ *
621
+ * **Warning:** This method is synchronous! It will block until completion.
622
+ *
623
+ * @return `true` if data exists on disk for this index, `false` otherwise.
624
+ */
625
+ public boolean hasOfflineData () {
626
+ return localIndex .exists ();
627
+ }
628
+
618
629
/**
619
630
* Bootstrap the local mirror with local data stored on the filesystem.
620
631
*
Original file line number Diff line number Diff line change @@ -818,6 +818,17 @@ private void flushObjectsToDisk(boolean force) throws AlgoliaException {
818
818
return new WriteTransaction ();
819
819
}
820
820
821
+ /**
822
+ * Test if this index has offline data on disk.
823
+ *
824
+ * **Warning:** This method is synchronous! It will block until completion.
825
+ *
826
+ * @return `true` if data exists on disk for this index, `false` otherwise.
827
+ */
828
+ public boolean hasOfflineData () {
829
+ return localIndex .exists ();
830
+ }
831
+
821
832
// ----------------------------------------------------------------------
822
833
// Helpers
823
834
// ----------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments