Prepares a list of modifications. For example, for a DB-based CacheLoader:
- Create a local (JDBC) transaction
- Associate the local transaction with
tx
(tx is the key) - Execute the corresponding SQL statements against the DB (statements derived from modifications)
For non-transactional CacheLoader (e.g. file-based), the implementation could attempt to implement its own transactional logic, attempting to write data to a temp location (or memory) and writing it to the proper location upon commit.
@param tx The transaction, indended to be used by implementations as an identifier of the transaction (and not necessarily a JTA {@link javax.transaction.Transaction} object)
@param modifications A {@link List} containing {@link org.jboss.cache.Modification}s, for the given transaction
@param one_phase Persist immediately and (for example) commit the local JDBC transaction as well. When true,we won't get a {@link #commit(Object)} or {@link #rollback(Object)} method call later
@throws Exception