protected String _becomeMaster(){
  _logger.info("Attempting to become " + lockType + " master.");
  Date now=new Date();
  Date expiration=new Date(System.currentTimeMillis() + GLOBAL_LOCK_EXPIRATION_PERIOD_MS);
  String lockNote=MessageFormat.format(GLOBAL_LOCK_NOTE_TEMPLATE,lockType,now,expiration);
synchronized (_globalInterlockService) {
    String key=_globalInterlockService.obtainLock(GLOBAL_LOCK_EXPIRATION_PERIOD_MS,lockType,lockNote);
    _logger.info("Attempt to become {} master {}.",lockType,(key == null ? "did not succeed" : "succeeded"));
    return key;
  }
}

protected String _becomeMaster ( ) { _logger . info ( "Attempting to become " + lockType + " master." ) ; Date now = new Date ( ) ; Date expiration = new Date ( System . currentTimeMillis ( ) + GLOBAL_LOCK_EXPIRATION_PERIOD_MS ) ; String lockNote = MessageFormat . format ( GLOBAL_LOCK_NOTE_TEMPLATE , lockType , now , expiration ) ; synchronized ( _globalInterlockService ) { String key = _globalInterlockService . obtainLock ( GLOBAL_LOCK_EXPIRATION_PERIOD_MS , lockType , lockNote ) ; _logger . info ( "Attempt to become {} master {}." , lockType , ( key == null ? "did not succeed" : "succeeded" ) ) ; return key ; } }
attempts to become the scheduling master .
