/** * Add a previously used master key to cache (when NN restarts), * should be called before activate(). * */ public synchronized void addKey(DelegationKey key) throws IOException { if (running) // a safety check throw new IOException("Can't add delegation key to a running SecretManager."); if (key.getKeyId() > getCurrentKeyId()) { setCurrentKeyId(key.getKeyId()); } allKeys.put(key.getKeyId(), key); }
/** * Add a previously used master key to cache (when NN restarts), * should be called before activate(). * */ public synchronized void addKey(DelegationKey key) throws IOException { if (running) // a safety check throw new IOException("Can't add delegation key to a running SecretManager."); if (key.getKeyId() > getCurrentKeyId()) { setCurrentKeyId(key.getKeyId()); } allKeys.put(key.getKeyId(), key); }
/** * Add a previously used master key to cache (when NN restarts), * should be called before activate(). * */ public synchronized void addKey(DelegationKey key) throws IOException { if (running) // a safety check throw new IOException("Can't add delegation key to a running SecretManager."); if (key.getKeyId() > getCurrentKeyId()) { setCurrentKeyId(key.getKeyId()); } allKeys.put(key.getKeyId(), key); }
/** * Add a previously used master key to cache (when NN restarts), * should be called before activate(). * */ public synchronized void addKey(DelegationKey key) throws IOException { if (running) // a safety check throw new IOException("Can't add delegation key to a running SecretManager."); if (key.getKeyId() > getCurrentKeyId()) { setCurrentKeyId(key.getKeyId()); } allKeys.put(key.getKeyId(), key); }
/** * Add a previously used master key to cache (when NN restarts), * should be called before activate(). * */ public synchronized void addKey(DelegationKey key) throws IOException { if (running) // a safety check throw new IOException("Can't add delegation key to a running SecretManager."); if (key.getKeyId() > getCurrentKeyId()) { setCurrentKeyId(key.getKeyId()); } allKeys.put(key.getKeyId(), key); }