java.lang.Object
org.cojen.tupl.diag.VerificationObserver
org.cojen.tupl.tools.Verify
Simple database verification utility. Main method requires a single argument — a base
file path for the database. An optional cache size can be provided too. Main method exits
with a status of 1 if verification failed, 0 if succeeded.
- See Also:
-
Field Summary
Fields inherited from class org.cojen.tupl.diag.VerificationObserver
height, index -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanindexBegin(Index ix, int height) Called before full index verification begins.booleanindexNodeFailed(long id, int level, String message) Called after an index node fails verification.booleanindexNodePassed(long id, int level, int entryCount, int freeBytes, int largeValueCount) Called after an index node passes verification.static voidtoString()Methods inherited from class org.cojen.tupl.diag.VerificationObserver
appendFailedMessage, indexComplete, reportFailure
-
Constructor Details
-
Verify
public Verify()
-
-
Method Details
-
main
- Parameters:
args- first argument is a base file path for the database, second optional argument is the cache size- Throws:
Exception
-
indexBegin
Description copied from class:VerificationObserverCalled before full index verification begins. Default implementation records the index and height, and then returns true.- Overrides:
indexBeginin classVerificationObserver- Parameters:
ix- index being verifiedheight- index height; is zero for empty indexes- Returns:
- false if verification should stop
-
indexNodePassed
public boolean indexNodePassed(long id, int level, int entryCount, int freeBytes, int largeValueCount) Description copied from class:VerificationObserverCalled after an index node passes verification. Implementation is free to report incremental progress or throttle verification. Default implementation does nothing but return true.- Overrides:
indexNodePassedin classVerificationObserver- Parameters:
id- ephemeral node identifierlevel- index node level; root node is level oneentryCount- total number of entries in the nodefreeBytes- amount of unused bytes in the nodelargeValueCount- number of values which don't fit entirely in the node- Returns:
- false if verification should stop
-
indexNodeFailed
Description copied from class:VerificationObserverCalled after an index node fails verification. Implementation is free to report incremental progress or throttle verification. Default implementation prints a message to standard out and returns true.- Overrides:
indexNodeFailedin classVerificationObserver- Parameters:
id- ephemeral node identifierlevel- index node level; root node is level onemessage- failure message- Returns:
- false if verification should stop
-
toString
-