public void treatNotification(INotificationData iNotif) {\r
CsarHandler csar = null;\r
try {\r
- // wait for a random time, so that 2 running Clamp will not treat the same Notification at the same time \r
- int i = ThreadLocalRandom.current().nextInt(1, 5);\r
- Thread.sleep(i * 1000);\r
-\r
+ // wait for a random time, so that 2 running Clamp will not treat\r
+ // the same Notification at the same time\r
+ long i = ThreadLocalRandom.current().nextInt(1, 5);\r
+ Thread.sleep(i * 1000L);\r
logger.info("Notification received for service UUID:" + iNotif.getServiceUUID());\r
this.changeControllerStatus(SdcSingleControllerStatus.BUSY);\r
csar = new CsarHandler(iNotif, this.sdcConfig.getSdcControllerName(),\r
e.getMessage(), System.currentTimeMillis());\r
} catch (InterruptedException e) {\r
logger.error("Interrupt exception caught during the notification processing", e);\r
+ Thread.currentThread().interrupt();\r
} catch (RuntimeException e) {\r
logger.error("Unexpected exception caught during the notification processing", e);\r
} finally {\r