Mercurial Hosting > luan
comparison src/luan/modules/lucene/LuceneIndex.java @ 1533:28f06ac6ce39
add not_in_transaction
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 02 Aug 2020 21:17:27 -0600 |
parents | 060ff7695317 |
children | e73b72a510b4 |
comparison
equal
deleted
inserted
replaced
1532:060ff7695317 | 1533:28f06ac6ce39 |
---|---|
289 wrote(); | 289 wrote(); |
290 writeLock.unlock(); | 290 writeLock.unlock(); |
291 } | 291 } |
292 } | 292 } |
293 | 293 |
294 public boolean is_in_transaction() { | |
295 return writeLock.isHeldByCurrentThread(); | |
296 } | |
297 | |
294 public Object run_in_transaction(LuanFunction fn) | 298 public Object run_in_transaction(LuanFunction fn) |
295 throws IOException, LuanException, SQLException | 299 throws IOException, LuanException, SQLException |
296 { | 300 { |
297 boolean commit = !writeLock.isHeldByCurrentThread(); | 301 boolean commit = !writeLock.isHeldByCurrentThread(); |
298 writeLock.lock(); | 302 writeLock.lock(); |