public BootstrapLockManager( AcrossContextInfo contextInfo ) {
this.contextInfo = contextInfo;
}
public void ensureLocked() {
DistributedLock lock = loadLock();
if ( !lock.isHeldByCurrentThread() ) {
LOG.debug( "Acquiring Across bootstrap lock, owner id: {}", lock.getOwnerId() );
long lockStartTime = System.currentTimeMillis();
lock.lock();
LOG.info( "Across bootstrap lock acquired by {} in {} ms", lock.getOwnerId(),
System.currentTimeMillis() - lockStartTime );
}
}