private boolean checkFailover ( ) throws InterruptedException { boolean isPrimary = isPrimaryServiceCached ( ) ; if ( ! isPrimary && isPrimaryService ( ) ) { this . servicePair . setPrimaryOfferService ( this ) ; return true ; } return false ; }
Determines whether a failover has happened and accordingly takes the appropriate action .