Class Verify


public class Verify extends VerificationObserver
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:
  • Constructor Details

    • Verify

      public Verify()
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Parameters:
      args - first argument is a base file path for the database, second optional argument is the cache size
      Throws:
      Exception
    • indexBegin

      public boolean indexBegin(Index ix, int height)
      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 class VerificationObserver
      Parameters:
      ix - index being verified
      height - 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 class VerificationObserver
      Parameters:
      id - ephemeral node identifier
      level - index node level; root node is level one
      entryCount - total number of entries in the node
      freeBytes - amount of unused bytes in the node
      largeValueCount - number of values which don't fit entirely in the node
      Returns:
      false if verification should stop
    • indexNodeFailed

      public boolean indexNodeFailed(long id, int level, String message)
      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 class VerificationObserver
      Parameters:
      id - ephemeral node identifier
      level - index node level; root node is level one
      message - failure message
      Returns:
      false if verification should stop
    • toString

      public String toString()
      Overrides:
      toString in class Object