diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-08-23 14:10:46 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-08-23 16:04:49 +0200 |
commit | ab25ddea2b1a153fa96dcf2faf5765310398db69 (patch) | |
tree | c6d46458ef80e7fd8da5171cccace080f0bbf50e /infra/translate-utils/src/main/java/io | |
parent | d5cf563f312609ad9b998835c794e79a67c6767c (diff) |
DumpCacheManager: make dumpParams optional
Change-Id: I6ee37f9e39842468f746656dff53b98c2b3796ba
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/translate-utils/src/main/java/io')
-rw-r--r-- | infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/cache/DumpCacheManager.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/cache/DumpCacheManager.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/cache/DumpCacheManager.java index d3cfd415a..a0856793d 100644 --- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/cache/DumpCacheManager.java +++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/read/cache/DumpCacheManager.java @@ -57,6 +57,21 @@ public final class DumpCacheManager<T, U> { * * @param identifier identifier for origin of dumping context * @param cache modification cache of current transaction + * @throws ReadFailedException if execution of dumping request failed + * @returns If present in cache ,returns cached instance, if not, tries to dump data using provided executor, + * otherwise Optional.absent() + */ + public Optional<T> getDump(@Nonnull final InstanceIdentifier<?> identifier, + @Nonnull final ModificationCache cache) + throws ReadFailedException { + return getDump(identifier, cache, null); + } + + /** + * Returns {@link Optional<T>} of dump + * + * @param identifier identifier for origin of dumping context + * @param cache modification cache of current transaction * @param dumpParams parameters to configure dump request * @throws ReadFailedException if execution of dumping request failed * @returns If present in cache ,returns cached instance, if not, tries to dump data using provided executor, |