use of org.janusgraph.util.datastructures.ExceptionWrapper in project janusgraph by JanusGraph.
the class CQLStoreManager method close.
@Override
public void close() throws BackendException {
try {
ExceptionWrapper exceptionWrapper = new ExceptionWrapper();
executeWithCatching(this::clearJmxMetrics, exceptionWrapper);
executeWithCatching(session::close, exceptionWrapper);
throwIfException(exceptionWrapper);
} finally {
gracefulExecutorServiceShutdown(executorService, threadPoolShutdownMaxWaitTime);
}
}
use of org.janusgraph.util.datastructures.ExceptionWrapper in project janusgraph by JanusGraph.
the class KCVSLogManager method close.
@Override
public synchronized void close() throws BackendException {
/* Copying the map is necessary to avoid ConcurrentModificationException.
* The path to ConcurrentModificationException in the absence of a copy is
* log.close() -> manager.closedLog(log) -> openLogs.remove(log.getName()).
*/
ExceptionWrapper exceptionWrapper = new ExceptionWrapper();
for (KCVSLog log : new ArrayList<>(openLogs.values())) {
executeWithCatching(log::close, exceptionWrapper);
}
IOUtils.closeQuietly(serializer);
throwIfException(exceptionWrapper);
}
Aggregations