Ejemplo n.º 1
0
 @Override
 public void commit() {
   commitLock.writeLock().lock();
   try {
     cleanTxQueue();
     super.commit();
     uncommitedData = false;
   } finally {
     commitLock.writeLock().unlock();
   }
 }
Ejemplo n.º 2
0
  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;
  }
Ejemplo n.º 3
0
 protected void superCommit() {
   assert (commitLock.isWriteLockedByCurrentThread());
   super.commit();
 }