Ejemplo n.º 1
0
 /**
  * Called to import the handover table_view pointer & notify listeners. This should be invoked
  * once the {@link #pendingQuery} finish, unless the user force {@link #load()}.
  *
  * @return {@code true} if it successfully completed the query, {@code false} otherwise.
  */
 private boolean onCompleted() {
   try {
     long tvHandover = pendingQuery.get(); // make the query blocking
     // this may fail with BadVersionException if the caller and/or the worker thread
     // are not in sync. COMPLETED_ASYNC_REALM_RESULTS will be fired by the worker thread
     // this should handle more complex use cases like retry, ignore etc
     table =
         query.importHandoverTableView(tvHandover, realm.sharedGroupManager.getNativePointer());
     isCompleted = true;
     notifyChangeListeners();
   } catch (Exception e) {
     RealmLog.d(e.getMessage());
     return false;
   }
   return true;
 }