checkConsistency() - JDO PersistenceManager's method

void checkConsistency()

Validates the PersistenceManager cache with the datastore. This method has no effect if a transaction is not active.

If a datastore transaction is active, this method verifies the consistency of instances in the cache against the datastore. An implementation might flush instances as if flush were called, but it is not required to do so.

If an optimistic transaction is active, this method obtains a datastore connection and verifies the consistency of the instances in the cache against the datastore. If any inconsistencies are detected, a JDOOptimisticVerificationException is thrown. This exception contains a nested JDOOptimisticVerificationException for each object that failed the consistency check. No datastore resources acquired during the execution of this method are held beyond the scope of this method.

JDO 2.0

This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.