private static class TransactionTable.UpdateTransactionCounter extends java.lang.Object implements TransactionTable.EntryVisitor
TransactionTable
instance) while
applying the visitor.Modifier and Type | Field and Description |
---|---|
private int |
count |
private boolean |
stopOnFirst |
Constructor and Description |
---|
UpdateTransactionCounter(boolean stopOnFirst)
Create an instance of this visitor.
|
Modifier and Type | Method and Description |
---|---|
(package private) int |
getCount()
Get the number of update transactions seen by this visitor
|
boolean |
visit(TransactionTableEntry entry)
Check if the entry represents an update transaction, and update
the counter accordingly.
|
UpdateTransactionCounter(boolean stopOnFirst)
stopOnFirst
- if true
, stop the scan as soon as we
have found one update transaction (useful if all we care about is
whether or not the transaction table contains an update transaction);
otherwise, scan the entire transaction tablepublic boolean visit(TransactionTableEntry entry)
visit
in interface TransactionTable.EntryVisitor
entry
- the TransactionTableEntry
being visitedtrue
if the scan of the transaction table should
continue, or false
if the visitor has completed its work
and no more entries need to be visitedint getCount()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.