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

@@ -313,6 +313,8 @@ public class ConfigManager
String oldValue = (String) properties.remove(groupName + "." + key); String oldValue = (String) properties.remove(groupName + "." + key);
if (client != null) if (client != null)
{
final Runnable task = () ->
{ {
try try
{ {
@@ -322,6 +324,9 @@ public class ConfigManager
{ {
log.warn("unable to set configuration item", ex); log.warn("unable to set configuration item", ex);
} }
};
executor.execute(task);
} }
Runnable task = () -> Runnable task = () ->