aboutsummaryrefslogtreecommitdiffstats
path: root/champ-lib/champ-janus
diff options
context:
space:
mode:
authorWiktor Garbarek <wiktor.garbarek@nokia.com>2018-07-09 15:18:19 +0200
committerWiktor Garbarek <wiktor.garbarek@nokia.com>2018-07-09 15:18:19 +0200
commit29a772f710bd05bcf1a6a3da9af9b198bc003482 (patch)
treeefc470c4106b84fb52b3d487c9e2c283038e32b1 /champ-lib/champ-janus
parentbce8bc8383c3f19b64b360a941ec1b1503791c85 (diff)
Fix handling of InterruptedException in AAI-Champ
Added thread interrupts Change-Id: Ic5b7eef71354efd02736e88a1e6716aa84169898 Issue-ID: AAI-1367 Signed-off-by: Wiktor Garbarek <wiktor.garbarek@nokia.com>
Diffstat (limited to 'champ-lib/champ-janus')
-rw-r--r--champ-lib/champ-janus/src/main/java/org/onap/aai/champjanus/graph/impl/JanusChampGraphImpl.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/champ-lib/champ-janus/src/main/java/org/onap/aai/champjanus/graph/impl/JanusChampGraphImpl.java b/champ-lib/champ-janus/src/main/java/org/onap/aai/champjanus/graph/impl/JanusChampGraphImpl.java
index 906c767..f78450c 100644
--- a/champ-lib/champ-janus/src/main/java/org/onap/aai/champjanus/graph/impl/JanusChampGraphImpl.java
+++ b/champ-lib/champ-janus/src/main/java/org/onap/aai/champjanus/graph/impl/JanusChampGraphImpl.java
@@ -383,6 +383,7 @@ public final class JanusChampGraphImpl extends AbstractTinkerpopChampGraph {
}
} catch (InterruptedException e) {
LOGGER.warn("Interrupted while waiting for object index creation status");
+ Thread.currentThread().interrupt();
return;
}
@@ -394,6 +395,7 @@ public final class JanusChampGraphImpl extends AbstractTinkerpopChampGraph {
updateIndexMgmt.commit();
} catch (InterruptedException e) {
LOGGER.warn("Interrupted while reindexing for object index");
+ Thread.currentThread().interrupt();
return;
} catch (ExecutionException e) {
LOGGER.warn("Exception occurred during reindexing procedure for creating object index " + indexName, e);
@@ -406,6 +408,7 @@ public final class JanusChampGraphImpl extends AbstractTinkerpopChampGraph {
.call();
} catch (InterruptedException e) {
LOGGER.warn("Interrupted while waiting for index to transition to ENABLED state");
+ Thread.currentThread().interrupt();
return;
}
}