@Override
 public void commit() {
   commitLock.writeLock().lock();
   try {
     cleanTxQueue();
     super.commit();
     uncommitedData = false;
   } finally {
     commitLock.writeLock().unlock();
   }
 }
  protected Long preallocRecidTake() {
    assert (commitLock.isWriteLockedByCurrentThread());
    Long recid = preallocRecids.poll();
    if (recid != null) return recid;

    if (uncommitedData) throw new IllegalAccessError("uncommited data");

    for (int i = 0; i < PREALLOC_RECID_SIZE; i++) {
      preallocRecids.add(super.preallocate());
    }
    recid = super.preallocate();
    super.commit();
    uncommitedData = false;
    return recid;
  }
 protected void superCommit() {
   assert (commitLock.isWriteLockedByCurrentThread());
   super.commit();
 }