diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-04-13 13:38:16 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-08-17 10:17:15 +0000 |
commit | fa641a3e06a905cb3222ebd15a2b4ab90b599efc (patch) | |
tree | 2043bcea16a4105a7b93aaf057e17e34adf1d607 /infra/data-api/src | |
parent | 2be001c5014010698ed930236496bb939df89cde (diff) |
HONEYCOMB-431: delegate DataModification.validate to WriterRegistry
This patch introduces ModifiableDataTreeDelegator.validateCandidate
that translates DataTreeCandidate to DataObjectUpdates
and delegates validation to WriterRegistry (similarly as for bulk update).
ModifiableDataTreeManager.commit implementation
invokes validation before bulk update.
To make it efficient, DataObjectUpdates are computed once
and stored in DataTreeContext.
Change-Id: If4bd558e64ed84c11c9c50c7a98a2aaa8db841bb
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/data-api/src')
-rw-r--r-- | infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java b/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java index a87983cdb..9fef3b48c 100644 --- a/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java +++ b/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java @@ -55,6 +55,8 @@ public interface DataModification extends ReadableDataManager, AutoCloseable { /** * Alters data tree using this modification. * + * <p>Modification is validated before application. + * * @throws TranslationException if commit failed while updating data tree state */ void commit() throws TranslationException; |