[MDSAL-427] Make DataBroker resource allocation asynchronous Created: 18/Mar/19  Updated: 01/Dec/21

Status: Confirmed
Project: mdsal
Component/s: Binding API, DOM API
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Allocating a TransactionChain and registering a DataTreeChangeListener should be asynchronous.

The first case makes for a weird pattern with error handler, as the handler may fire during allocation. Making allocation asynchronous makes the contract better by separating the allocation failure and normal failure. Normal failure may only occur after the allocation succeeds.

The second case is similar, but also invokes notification. This means that events can only be delivered after the allocation succeeds, hence the user can react to failures separately and it also means that notifications cannot occur as part of register() call.


Generated at Wed Feb 07 20:09:47 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.