KMSClientProvider provider = providers[(currPos + i) % providers.length]; try { return op.call(provider); } catch (AccessControlException ace) {
private <T> T doOp(ProviderCallable<T> op, int currPos) throws IOException { IOException ex = null; for (int i = 0; i < providers.length; i++) { KMSClientProvider provider = providers[(currPos + i) % providers.length]; try { return op.call(provider); } catch (IOException ioe) { LOG.warn("KMS provider at [{}] threw an IOException [{}]!!", provider.getKMSUrl(), ioe.getMessage()); ex = ioe; } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException)e; } else { throw new WrapperException(e); } } } if (ex != null) { LOG.warn("Aborting since the Request has failed with all KMS" + " providers in the group. !!"); throw ex; } throw new IOException("No providers configured !!"); }
private <T> T doOp(ProviderCallable<T> op, int currPos) throws IOException { IOException ex = null; for (int i = 0; i < providers.length; i++) { KMSClientProvider provider = providers[(currPos + i) % providers.length]; try { return op.call(provider); } catch (IOException ioe) { LOG.warn("KMS provider at [{}] threw an IOException [{}]!!", provider.getKMSUrl(), ioe.getMessage()); ex = ioe; } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException)e; } else { throw new WrapperException(e); } } } if (ex != null) { LOG.warn("Aborting since the Request has failed with all KMS" + " providers in the group. !!"); throw ex; } throw new IOException("No providers configured !!"); }
private <T> T doOp(ProviderCallable<T> op, int currPos) throws IOException { IOException ex = null; for (int i = 0; i < providers.length; i++) { KMSClientProvider provider = providers[(currPos + i) % providers.length]; try { return op.call(provider); } catch (IOException ioe) { LOG.warn("KMS provider at [{}] threw an IOException [{}]!!", provider.getKMSUrl(), ioe.getMessage()); ex = ioe; } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException)e; } else { throw new WrapperException(e); } } } if (ex != null) { LOG.warn("Aborting since the Request has failed with all KMS" + " providers in the group. !!"); throw ex; } throw new IOException("No providers configured !!"); }
private <T> T doOp(ProviderCallable<T> op, int currPos) throws IOException { IOException ex = null; for (int i = 0; i < providers.length; i++) { KMSClientProvider provider = providers[(currPos + i) % providers.length]; try { return op.call(provider); } catch (IOException ioe) { LOG.warn("KMS provider at [{}] threw an IOException [{}]!!", provider.getKMSUrl(), ioe.getMessage()); ex = ioe; } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException)e; } else { throw new WrapperException(e); } } } if (ex != null) { LOG.warn("Aborting since the Request has failed with all KMS" + " providers in the group. !!"); throw ex; } throw new IOException("No providers configured !!"); }