96 words

flush() - JDO PersistenceManager's method

Flushes all dirty, new, and deleted instances to the data store. It has no effect if a transaction is not active.

If a datastore transaction is active, this method synchronizes the cache with the datastore and reports any exceptions.

If an optimistic transaction is active, this method obtains a datastore connection, synchronizes the cache with the datastore using this connection and reports any exceptions. The connection obtained by this method is held until the end of the transaction.

If exceptions occur during flush, the implementation will set the current transaction's RollbackOnly flag (see Transaction.setRollbackOnly).

Since:
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.