protected void retryReplicationIfError ( ) { Log . d ( TAG , "retryReplicationIfError() state=" + stateMachine . getState ( ) + ", error=" + this . error + ", isContinuous()=" + isContinuous ( ) + ", isTransientError()=" + Utils . isTransientError ( this . error ) ) ; // Make sure if state is IDLE, this method should be called when state becomes IDLE if ( ! stateMachine . getState ( ) . equals ( ReplicationState . IDLE ) ) return ; if ( this . error != null ) { // IDLE_ERROR if ( isContinuous ( ) ) { // 12/16/2014 - only retry if error is transient error 50x http error // It may need to retry for any kind of errors if ( Utils . isTransientError ( this . error ) ) { onBeforeScheduleRetry ( ) ; cancelRetryFuture ( ) ; scheduleRetryFuture ( ) ; } } } }
Retry replication if previous attempt ends with error