Package com.caucho.db.lock

Examples of com.caucho.db.lock.Lock.unlockRead()


    if (_readLocks != null) {
      for (int i = 0; i < _readLocks.size(); i++) {
        Lock lock = _readLocks.get(i);

        try {
          lock.unlockRead();
        } catch (Throwable e) {
          log.log(Level.WARNING, e.toString(), e);
        }
      }
View Full Code Here


      try {
        byte []blockBuffer = block.getBuffer();

        os.write(blockBuffer, blockOffset, length);
      } finally {
        lock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

        System.arraycopy(blockBuffer, blockOffset,
                         buffer, offset, length);

        return length;
      } finally {
        lock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

          blockOffset += 2;
        }

        return length;
      } finally {
        lock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

      try {
        byte []blockBuffer = block.getBuffer();

        return readLong(blockBuffer, offset);
      } finally {
        lock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

        System.arraycopy(blockBuffer, blockOffset + fragmentOffset,
                         buffer, offset, length);

        return length;
      } finally {
        lock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

          blockOffset += 2;
        }

        return length;
      } finally {
        lock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

        byte []blockBuffer = block.getBuffer();

        return readLong(blockBuffer, blockOffset + fragmentOffset);
      } finally {
        lock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

  if (isLeaf || value == FAIL)
    return value;
  else
    return lookup(keyBuffer, keyOffset, keyLength, value);
      } finally {
        blockLock.unlockRead();
      }
    } finally {
      block.free();
    }
  }
View Full Code Here

      return insert(keyBuffer, keyOffset, keyLength,
                    value, isOverride, true,
                    childBlockId);
    } finally {
      blockLock.unlockRead();
    }
  }

  private boolean insertWriteChild(byte []keyBuffer,
                                   int keyOffset,
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.