diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2016-08-31 08:36:24 +0200 |
---|---|---|
committer | Maros Marsalek <mmarsale@cisco.com> | 2016-08-31 06:47:49 +0000 |
commit | d8735d25aae8c51255459099799d626ca31eeb39 (patch) | |
tree | 849bb52906abf82514e25053e4b75dfa39899817 /vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java | |
parent | c961bd752be1fb2eee707cb5c7c44d1bda0894d2 (diff) |
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 <jsrnicek@cisco.com>
Diffstat (limited to 'vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java')
-rw-r--r-- | vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/cache/EntityDumpExecutor.java | 19 |
1 files changed, 7 insertions, 12 deletions
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<T extends JVppReplyDump, U> { +@ThreadSafe +public interface EntityDumpExecutor<T, U> { /** - * 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; } |