Package com.foreach.common.concurrent.locks.distributed

Examples of com.foreach.common.concurrent.locks.distributed.DistributedLock.lock()


    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 );
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.