private void obtainLocalLocks(){
  lockReq=new TXLockRequest();
  GemFireCacheImpl cache=GemFireCacheImpl.getExisting("");
  for (  TransactionalOperation txOp : this.recordedOperations) {
    if (ServerRegionOperation.lockKeyForTx(txOp.getOperation())) {
      TXRegionLockRequest rlr=lockReq.getRegionLockRequest(txOp.getRegionName());
      if (rlr == null) {
        rlr=new TXRegionLockRequestImpl(cache.getRegionByPath(txOp.getRegionName()));
        lockReq.addLocalRequest(rlr);
      }
      if (txOp.getOperation() == ServerRegionOperation.PUT_ALL || txOp.getOperation() == ServerRegionOperation.REMOVE_ALL) {
        rlr.addEntryKeys(txOp.getKeys());
      }
 else {
        rlr.addEntryKey(txOp.getKey());
      }
    }
  }
  if (logger.isDebugEnabled()) {
    logger.debug("TX: client localLockRequest: {}",lockReq);
  }
  try {
    lockReq.obtain();
  }
 catch (  CommitConflictException e) {
    rollback();
    throw e;
  }
  if (internalAfterLocalLocks != null) {
    internalAfterLocalLocks.run();
  }
}

private void obtainLocalLocks ( ) { lockReq = new TXLockRequest ( ) ; GemFireCacheImpl cache = GemFireCacheImpl . getExisting ( "" ) ; for ( TransactionalOperation txOp : this . recordedOperations ) { if ( ServerRegionOperation . lockKeyForTx ( txOp . getOperation ( ) ) ) { TXRegionLockRequest rlr = lockReq . getRegionLockRequest ( txOp . getRegionName ( ) ) ; if ( rlr == null ) { rlr = new TXRegionLockRequestImpl ( cache . getRegionByPath ( txOp . getRegionName ( ) ) ) ; lockReq . addLocalRequest ( rlr ) ; } if ( txOp . getOperation ( ) == ServerRegionOperation . PUT_ALL || txOp . getOperation ( ) == ServerRegionOperation . REMOVE_ALL ) { rlr . addEntryKeys ( txOp . getKeys ( ) ) ; } else { rlr . addEntryKey ( txOp . getKey ( ) ) ; } } } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "TX: client localLockRequest: {}" , lockReq ) ; } try { lockReq . obtain ( ) ; } catch ( CommitConflictException e ) { rollback ( ) ; throw e ; } if ( internalAfterLocalLocks != null ) { internalAfterLocalLocks . run ( ) ; } }
lock the keys in a local transaction manager
