I wonder if transactionState and txDependencyLatch shouldn't be wrapped in a separate object, which RemoteTransaction has access to, and which has the methods synchronized...etc. It would better encapsulate the logic that needs to be synchronized, as opposed to mixing it up with RemoteTransaction's other logic.