@InterfaceAudience.Private
    private void refreshRemoteCheckpointDoc() {
        Log.i(Log.TAG_SYNC, "%s: Refreshing remote checkpoint to get its _rev...", this);
        Future future = sendAsyncRequest("GET", "_local/" + remoteCheckpointDocID(), null, new RemoteRequestCompletion() {
            @Override
            public void onCompletion(RemoteRequest remoteRequest, Response httpResponse, Object result, Throwable e) {
                if (db == null) {
                    Log.w(Log.TAG_SYNC, "%s: db == null while refreshing remote checkpoint.  aborting", this);
                    return;
                }
                if (e != null && Utils.getStatusFromError(e) != Status.NOT_FOUND) {
                    Log.e(Log.TAG_SYNC, "%s: Error refreshing remote checkpoint", e, this);
                } else {
                    Log.d(Log.TAG_SYNC, "%s: Refreshed remote checkpoint: %s", this, result);
                    remoteCheckpoint = (Map<String, Object>) result;
                    lastSequenceChanged = true;
                    saveLastSequence();  // try saving again
                }
            }
        });
        pendingFutures.add(future);
    }
@ InterfaceAudience . Private private void refreshRemoteCheckpointDoc ( ) { Log . i ( Log . TAG_SYNC , "%s: Refreshing remote checkpoint to get its _rev..." , this ) ; Future future = sendAsyncRequest ( "GET" , "_local/" + remoteCheckpointDocID ( ) , null , new RemoteRequestCompletion ( ) { @ Override public void onCompletion ( RemoteRequest remoteRequest , Response httpResponse , Object result , Throwable e ) { if ( db == null ) { Log . w ( Log . TAG_SYNC , "%s: db == null while refreshing remote checkpoint.  aborting" , this ) ; return ; } if ( e != null && Utils . getStatusFromError ( e ) != Status . NOT_FOUND ) { Log . e ( Log . TAG_SYNC , "%s: Error refreshing remote checkpoint" , e , this ) ; } else { Log . d ( Log . TAG_SYNC , "%s: Refreshed remote checkpoint: %s" , this , result ) ; remoteCheckpoint = ( Map < String , Object > ) result ; lastSequenceChanged = true ; saveLastSequence ( ) ; } } } ) ; pendingFutures . add ( future ) ; }
Variant of -fetchRemoveCheckpointDoc that's used while replication is running, to reload the
checkpoint to get its current revision number, if there was an error saving it.