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)
|
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 = () ->
|
||||||
|
|||||||
Reference in New Issue
Block a user