Bug 2260: Reduce overhead of unused TransactionProxy instances
Moved constructon of the operationLimiter and operationCompleter to the
throtteOperation method lazily. Added a volatile initialized boolean for
the lazy check and to "piggy-back" synchronize the updates to
operationLimiter and operationCompleter as well.
In TransactionProxy#ready, if no operations were performed then the
txFutureCallbackMap will be empty so returned a static
NoOpDOMStoreThreePhaseCommitCohort in that case.
The only remaining overhead in the constructor is the
TransactionIdentifier instance. The Builder seemed extraneous here so I
removed it to reduce the overhead from 2 object allocations to 1.
Change-Id: I083d4176c880055938bbf1f21c00da3859d66af6
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>