public synchronized void clearTransactions(Date fromDate){
  lock.lock();
  try {
    if (fromDate == null) {
      unspent.clear();
      spent.clear();
      pending.clear();
      dead.clear();
    }
 else {
      removeEntriesAfterDate(unspent,fromDate);
      removeEntriesAfterDate(spent,fromDate);
      removeEntriesAfterDate(pending,fromDate);
      removeEntriesAfterDate(dead,fromDate);
    }
  }
  finally {
    lock.unlock();
  }
}

public synchronized void clearTransactions ( Date fromDate ) { lock . lock ( ) ; try { if ( fromDate == null ) { unspent . clear ( ) ; spent . clear ( ) ; pending . clear ( ) ; dead . clear ( ) ; } else { removeEntriesAfterDate ( unspent , fromDate ) ; removeEntriesAfterDate ( spent , fromDate ) ; removeEntriesAfterDate ( pending , fromDate ) ; removeEntriesAfterDate ( dead , fromDate ) ; } } finally { lock . unlock ( ) ; } }
deletes transactions which appeared after a certain date
