From 130c716105017c7b20b4779973b915968b3dc322 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Wed, 16 Aug 2017 09:21:24 +0200 Subject: HONEYCOMB-386 - Make update optional If customizer does not support update directly, updates for its handled nodes are broken up to delete + create pairs. Change-Id: I2929109e8c9a1db0bef108367cf7d839135ce173 Signed-off-by: Jan Srnicek --- .../translate/write/registry/WriterRegistry.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java') diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java index 5520c00ec..a297b6de8 100644 --- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java +++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/write/registry/WriterRegistry.java @@ -41,12 +41,19 @@ public interface WriterRegistry { * @throws BulkUpdateException in case bulk update fails * @throws TranslationException in case some other error occurs while processing update request */ - void update(@Nonnull DataObjectUpdates updates, - @Nonnull WriteContext ctx) throws TranslationException; + void processModifications(@Nonnull DataObjectUpdates updates, + @Nonnull WriteContext ctx) throws TranslationException; /** - * Simple DTO containing updates for {@link WriterRegistry}. Currently only deletes and updates (create + update) - * are distinguished. + * Indicates direct support for update operation on provided type + * + * @param type data object type + */ + boolean writerSupportsUpdate(@Nonnull InstanceIdentifier type); + + /** + * Simple DTO containing updates for {@link WriterRegistry}. Currently only deletes and updates (create + + * update) are distinguished. */ @Beta final class DataObjectUpdates { -- cgit 1.2.3-korg