@Override public KeyVersion getCurrentKey(String name) throws IOException { try { return getExtension().currentKeyCache.get(name); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); if (cause instanceof KeyNotFoundException) { return null; } else if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
@Override public void deleteKey(String name) throws IOException { getKeyProvider().deleteKey(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); // invalidating all key versions as we don't know // which ones belonged to the deleted key getExtension().keyVersionCache.invalidateAll(); }
@Override public Metadata getMetadata(String name) throws IOException { try { return getExtension().keyMetadataCache.get(name); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); if (cause instanceof KeyNotFoundException) { return null; } else if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
@Override public KeyVersion getKeyVersion(String versionName) throws IOException { try { return getExtension().keyVersionCache.get(versionName); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); if (cause instanceof KeyNotFoundException) { return null; } else if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
@Override public void invalidateCache(String name) throws IOException { getKeyProvider().invalidateCache(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); // invalidating all key versions as we don't know // which ones belonged to the deleted key getExtension().keyVersionCache.invalidateAll(); }
@Override public void deleteKey(String name) throws IOException { getKeyProvider().deleteKey(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); // invalidating all key versions as we don't know // which ones belonged to the deleted key getExtension().keyVersionCache.invalidateAll(); }
@Override public KeyVersion getCurrentKey(String name) throws IOException { try { return getExtension().currentKeyCache.get(name); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); if (cause instanceof KeyNotFoundException) { return null; } else if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
@Override public void deleteKey(String name) throws IOException { getKeyProvider().deleteKey(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); // invalidating all key versions as we don't know // which ones belonged to the deleted key getExtension().keyVersionCache.invalidateAll(); }
@Override public KeyVersion getKeyVersion(String versionName) throws IOException { try { return getExtension().keyVersionCache.get(versionName); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); if (cause instanceof KeyNotFoundException) { return null; } else if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
@Override public void deleteKey(String name) throws IOException { getKeyProvider().deleteKey(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); // invalidating all key versions as we don't know // which ones belonged to the deleted key getExtension().keyVersionCache.invalidateAll(); }
@Override public KeyVersion rollNewVersion(String name, byte[] material) throws IOException { KeyVersion key = getKeyProvider().rollNewVersion(name, material); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }
@Override public KeyVersion rollNewVersion(String name, byte[] material) throws IOException { KeyVersion key = getKeyProvider().rollNewVersion(name, material); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }
@Override public KeyVersion rollNewVersion(String name, byte[] material) throws IOException { KeyVersion key = getKeyProvider().rollNewVersion(name, material); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }
@Override public KeyVersion rollNewVersion(String name) throws NoSuchAlgorithmException, IOException { KeyVersion key = getKeyProvider().rollNewVersion(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }
@Override public KeyVersion rollNewVersion(String name) throws NoSuchAlgorithmException, IOException { KeyVersion key = getKeyProvider().rollNewVersion(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }
@Override public KeyVersion rollNewVersion(String name) throws NoSuchAlgorithmException, IOException { KeyVersion key = getKeyProvider().rollNewVersion(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }
@Override public KeyVersion getKeyVersion(String versionName) throws IOException { try { return getExtension().keyVersionCache.get(versionName); } catch (ExecutionException ex) { Throwable cause = ex.getCause(); if (cause instanceof KeyNotFoundException) { return null; } else if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
@Override public void deleteKey(String name) throws IOException { getKeyProvider().deleteKey(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); // invalidating all key versions as we don't know // which ones belonged to the deleted key getExtension().keyVersionCache.invalidateAll(); }
@Override public KeyVersion rollNewVersion(String name, byte[] material) throws IOException { KeyVersion key = getKeyProvider().rollNewVersion(name, material); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }
@Override public KeyVersion rollNewVersion(String name) throws NoSuchAlgorithmException, IOException { KeyVersion key = getKeyProvider().rollNewVersion(name); getExtension().currentKeyCache.invalidate(name); getExtension().keyMetadataCache.invalidate(name); return key; }