void flush()
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