From d8735d25aae8c51255459099799d626ca31eeb39 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Wed, 31 Aug 2016 08:36:24 +0200 Subject: HONEYCOMB-144 - Make dump cache manager thread-save Modified to be thread save and generic to be usable in all plugins Change-Id: I26c90e8c8aa13c07fa389d86a9784e92e9532bcd Signed-off-by: Jan Srnicek --- .../translate/v3po/util/cache/EntityDumpExecutor.java | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java') diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java index b25c59a8a..8f3ae5596 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java @@ -17,25 +17,20 @@ package io.fd.honeycomb.translate.v3po.util.cache; import io.fd.honeycomb.translate.v3po.util.cache.exceptions.execution.DumpExecutionFailedException; -import org.openvpp.jvpp.dto.JVppReplyDump; +import javax.annotation.concurrent.ThreadSafe; /** - * Generic interface for classes that return dumps for Data objects + * Generic interface for classes that return dumps for Data objects. + * Must be implemented in Thread-save fashion. */ -public interface EntityDumpExecutor { +@ThreadSafe +public interface EntityDumpExecutor { /** - * Performs dump on {link T} entity + * Performs dump on {@link T} entity * * @return dump of specified {@link T} entity * @throws DumpExecutionFailedException when dump fails */ - public T executeDump() throws DumpExecutionFailedException; - - /** - * Bind dumping params for executor - */ - default public void bindDumpParams(U params) { - throw new UnsupportedOperationException("You should override this method if you need to bind dumping params"); - } + T executeDump(final U params) throws DumpExecutionFailedException; } -- cgit 1.2.3-korg