Class Verify
java.lang.Object
org.cojen.tupl.diag.VerificationObserver
org.cojen.tupl.tools.Verify
Simple database verification utility. The main method requires a single argument — a
base file path for the database. An optional cache size can be provided too. The main method
exits with a status of 1 if verification failed, or else 0 if it succeeded.
- See Also:
-
Field Summary
Fields inherited from class org.cojen.tupl.diag.VerificationObserver
height, index
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
indexBegin
(Index ix, int height) Called before full index verification begins.boolean
indexNodeFailed
(long id, int level, String message) Called after an index node fails verification.boolean
indexNodePassed
(long id, int level, int entryCount, int freeBytes, int largeValueCount) Called after an index node passes verification.static void
toString()
Methods inherited from class org.cojen.tupl.diag.VerificationObserver
appendFailedMessage, indexComplete, reportFailure
-
Constructor Details
-
Verify
public Verify()
-
-
Method Details
-
main
-
indexBegin
Description copied from class:VerificationObserver
Called before full index verification begins. Default implementation records the index and height, and then returns true.- Overrides:
indexBegin
in 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:VerificationObserver
Called after an index node passes verification. Implementation is free to report incremental progress or throttle verification. Default implementation does nothing but return true.- Overrides:
indexNodePassed
in 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:VerificationObserver
Called 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:
indexNodeFailed
in classVerificationObserver
- Parameters:
id
- ephemeral node identifierlevel
- index node level; root node is level onemessage
- failure message- Returns:
- false if verification should stop
-
toString
-