@Beta public final class LoggingFutures extends Object
| Modifier and Type | Method and Description |
|---|---|
static <V> com.google.common.util.concurrent.FluentFuture<V> |
addErrorLogging(com.google.common.util.concurrent.FluentFuture<V> future,
org.slf4j.Logger logger,
String message)
Adds a callback to a ListenableFuture which logs any failures.
|
static <V> com.google.common.util.concurrent.FluentFuture<V> |
addErrorLogging(com.google.common.util.concurrent.FluentFuture<V> future,
org.slf4j.Logger logger,
String format,
Object... args)
Adds a callback to a FluentFuture which logs any failures.
|
static <V> com.google.common.util.concurrent.FluentFuture<V> |
addErrorLogging(com.google.common.util.concurrent.FluentFuture<V> future,
org.slf4j.Logger logger,
String format,
Object arg)
Adds a callback to a ListenableFuture which logs any failures.
|
static <V> com.google.common.util.concurrent.ListenableFuture<V> |
addErrorLogging(Future<V> future,
org.slf4j.Logger logger,
String message)
Adds a callback to a Future which logs any failures.
|
static <V> com.google.common.util.concurrent.ListenableFuture<V> |
addErrorLogging(Future<V> future,
org.slf4j.Logger logger,
String format,
Object... args)
Adds a callback to a ListenableFuture which logs any failures.
|
static <V> com.google.common.util.concurrent.ListenableFuture<V> |
addErrorLogging(Future<V> future,
org.slf4j.Logger logger,
String format,
Object arg)
Adds a callback to a Future which logs any failures.
|
static <V> com.google.common.util.concurrent.ListenableFuture<V> |
addErrorLogging(com.google.common.util.concurrent.ListenableFuture<V> future,
org.slf4j.Logger logger,
String message)
Adds a callback to a ListenableFuture which logs any failures.
|
static <V> com.google.common.util.concurrent.ListenableFuture<V> |
addErrorLogging(com.google.common.util.concurrent.ListenableFuture<V> future,
org.slf4j.Logger logger,
String format,
Object... args)
Adds a callback to a ListenableFuture which logs any failures.
|
static <V> com.google.common.util.concurrent.ListenableFuture<V> |
addErrorLogging(com.google.common.util.concurrent.ListenableFuture<V> future,
org.slf4j.Logger logger,
String format,
Object arg)
Adds a callback to a ListenableFuture which logs any failures.
|
public static <V> com.google.common.util.concurrent.ListenableFuture<V> addErrorLogging(Future<V> future, org.slf4j.Logger logger, String message)
future - the future to add logging tologger - logger to usemessage - message to logNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.ListenableFuture<V> addErrorLogging(Future<V> future, org.slf4j.Logger logger, String format, Object arg)
future - the future to add logging tologger - logger to useformat - format string conforming to String.format(String, Object...)arg - single format argumentNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.ListenableFuture<V> addErrorLogging(Future<V> future, org.slf4j.Logger logger, String format, Object... args)
Instead of using this helper, you should consider directly using
Futures.addCallback(ListenableFuture, FutureCallback, java.util.concurrent.Executor) to add a callback
which does real error recovery in case of a failure instead of just logging an error, if you can.
future - the future to add logging tologger - logger to useformat - format string conforming to String.format(String, Object...)args - format argumentsNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.ListenableFuture<V> addErrorLogging(com.google.common.util.concurrent.ListenableFuture<V> future,
org.slf4j.Logger logger,
String message)
Instead of using this helper, you should consider directly using
Futures.addCallback(ListenableFuture, FutureCallback, java.util.concurrent.Executor) to add a callback
which does real error recovery in case of a failure instead of just logging an error, if you can.
future - the future to add logging tologger - logger to usemessage - message to logNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.ListenableFuture<V> addErrorLogging(com.google.common.util.concurrent.ListenableFuture<V> future,
org.slf4j.Logger logger,
String format,
Object arg)
Instead of using this helper, you should consider directly using
Futures.addCallback(ListenableFuture, FutureCallback, java.util.concurrent.Executor) to add a callback
which does real error recovery in case of a failure instead of just logging an error, if you can.
future - the future to add logging tologger - logger to useformat - format string conforming to String.format(String, Object...)arg - single format argumentNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.ListenableFuture<V> addErrorLogging(com.google.common.util.concurrent.ListenableFuture<V> future,
org.slf4j.Logger logger,
String format,
Object... args)
Instead of using this helper, you should consider directly using
Futures.addCallback(ListenableFuture, FutureCallback, java.util.concurrent.Executor) to add a callback
which does real error recovery in case of a failure instead of just logging an error, if you can.
future - the future to add logging tologger - logger to useformat - format string conforming to String.format(String, Object...)args - format argumentsNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.FluentFuture<V> addErrorLogging(com.google.common.util.concurrent.FluentFuture<V> future,
org.slf4j.Logger logger,
String message)
Instead of using this helper, you should consider directly using
Futures.addCallback(ListenableFuture, FutureCallback, java.util.concurrent.Executor) to add a callback
which does real error recovery in case of a failure instead of just logging an error, if you can.
future - the future to add logging tologger - logger to usemessage - message to logNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.FluentFuture<V> addErrorLogging(com.google.common.util.concurrent.FluentFuture<V> future,
org.slf4j.Logger logger,
String format,
Object arg)
Instead of using this helper, you should consider directly using
Futures.addCallback(ListenableFuture, FutureCallback, java.util.concurrent.Executor) to add a callback
which does real error recovery in case of a failure instead of just logging an error, if you can.
future - the future to add logging tologger - logger to useformat - format string conforming to String.format(String, Object...)arg - single format argumentNullPointerException - if any of the arguments is nullpublic static <V> com.google.common.util.concurrent.FluentFuture<V> addErrorLogging(com.google.common.util.concurrent.FluentFuture<V> future,
org.slf4j.Logger logger,
String format,
Object... args)
Instead of using this helper, you should consider directly using
Futures.addCallback(ListenableFuture, FutureCallback, java.util.concurrent.Executor) to add a callback
which does real error recovery in case of a failure instead of just logging an error, if you can.
future - the future to add logging tologger - logger to useformat - format string conforming to String.format(String, Object...)args - format argumentsNullPointerException - if any of the arguments is nullCopyright © 2019 OpenDaylight. All rights reserved.