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:
@@ -314,14 +314,19 @@ public class ConfigManager
|
||||
|
||||
if (client != null)
|
||||
{
|
||||
try
|
||||
final Runnable task = () ->
|
||||
{
|
||||
client.unset(groupName + "." + key);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
log.warn("unable to set configuration item", ex);
|
||||
}
|
||||
try
|
||||
{
|
||||
client.unset(groupName + "." + key);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
log.warn("unable to set configuration item", ex);
|
||||
}
|
||||
};
|
||||
|
||||
executor.execute(task);
|
||||
}
|
||||
|
||||
Runnable task = () ->
|
||||
|
||||
Reference in New Issue
Block a user