# Methods

`-optimizeTransaction:`
  Optimizers must implement this method

### optimizeTransaction:

Optimizers must implement this method

>     - (id <FTTransaction>) optimizeTransaction: (id <FTTransaction>) toOptimize

##### Parameter Descriptions

> `toOptimize`
>   transaction to optimize

method result
  transaction to be used (after optimization)

##### Discussion

Each registered optimizer is called for each transaction before this transaction is to be executed (commit or rollback). Regardless of wether the optimizer ignores the hand-off instance, creates one, modifies the hand-off: In any case it has to return the (newly) transaction instance to be used.

(Last Updated August 27, 2006)