private Logger logger = Logger.getLogger(LockableBTree.class);
protected int id;
public void acquire(KernelContext kContext, int mode) throws ChaiDBException {
Lock lock = null;
try {
if (mode == IBTreeConst.READ_MODE) {
lock = BTreeLock.acquire(kContext, LockManager.LOCK_WAITING, new PageNumber(id, 0, 0), LockManager.LOCK_READ);
} else if (mode == IBTreeConst.WRITE_MODE) {
lock = BTreeLock.acquire(kContext, LockManager.LOCK_WAITING, new PageNumber(id, 0, 0), LockManager.LOCK_WRITE);