Make unsetConfiguration non-blocking

Send saving of the unsetConfiguration call to client to different thread
using ExecutorService to not block when it is called.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-03-23 17:17:51 +01:00
parent 143762f4a6
commit adf4c5bc80

View File

@@ -314,14 +314,19 @@ public class ConfigManager
if (client != null) if (client != null)
{ {
try final Runnable task = () ->
{ {
client.unset(groupName + "." + key); try
} {
catch (IOException ex) client.unset(groupName + "." + key);
{ }
log.warn("unable to set configuration item", ex); catch (IOException ex)
} {
log.warn("unable to set configuration item", ex);
}
};
executor.execute(task);
} }
Runnable task = () -> Runnable task = () ->