@Override protected void storeNewMasterKey(DelegationKey key) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing master key " + key.getKeyId()); } try { if (stateStore != null) { stateStore.storeTokenMasterKey(key); } } catch (IOException e) { LOG.error("Unable to store master key " + key.getKeyId(), e); } }
@Override protected void storeNewMasterKey(DelegationKey key) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing master key " + key.getKeyId()); } try { if (stateStore != null) { stateStore.storeTokenMasterKey(key); } } catch (IOException e) { LOG.error("Unable to store master key " + key.getKeyId(), e); } }
@Override protected void storeNewMasterKey(DelegationKey key) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Storing master key " + key.getKeyId()); } try { if (stateStore != null) { stateStore.storeTokenMasterKey(key); } } catch (IOException e) { LOG.error("Unable to store master key " + key.getKeyId(), e); } }
final Long tokenDate2 = 87654321L; store.storeTokenMasterKey(key1); try { store.storeTokenMasterKey(key1); fail("redundant store of key undetected"); } catch (IOException e) { store.storeTokenMasterKey(key2); final Long newTokenDate2 = 975318642L; store.updateToken(token2, newTokenDate2); store.removeTokenMasterKey(key1); store.storeTokenMasterKey(key3); store.storeToken(token3, tokenDate3); store.close();