Remove DeleteDataTransactionUtil 12/107212/11
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 2 Aug 2023 12:44:21 +0000 (14:44 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 3 Aug 2023 11:07:46 +0000 (11:07 +0000)
commit7435a1fe2a6b0db8fffa28bc128380350b261490
tree76837e29aadaf9e5a0b376cf90dbcca3821083e5
parentc9a6306fa0098965f7b5ddc4abff4e51526ddff8
Remove DeleteDataTransactionUtil

DeleteDataTransactionUtil contains only a single method, which is the
request to delete data from the configuration datastore.

Rather than having a free-standing utility, integrate this request into
RestconfStrategy as a well-defined method. The strategy can then
determine what is the appropriate way to implement it.

In the course of this exercise, we introduce RestconfFuture, which is a
ListenableFuture of a non-null value, which can only fail with a
RestconfDocumentedException.

As a side-effect of this, the MD-SAL implementation is made more
performant by removing an intermediate synchronization point when we
check for presence of target data.

JIRA: NETCONF-1111
Change-Id: I984547691baae19f21e8611a14ca50e4d5298c64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfFuture.java [new file with mode: 0644]
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/SettableRestconfFuture.java [new file with mode: 0644]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfDataServiceImpl.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/transactions/MdsalRestconfStrategy.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/transactions/NetconfRestconfStrategy.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/transactions/RestconfStrategy.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/DeleteDataTransactionUtil.java [deleted file]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/TransactionUtil.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/transactions/AbstractRestconfStrategyTest.java