net.i2p.router
Class PersistentKeyRing

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.concurrent.ConcurrentHashMap<Hash,SessionKey>
          extended by net.i2p.util.KeyRing
              extended by net.i2p.router.PersistentKeyRing
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.ConcurrentMap<Hash,SessionKey>, java.util.Map<Hash,SessionKey>

public class PersistentKeyRing
extends KeyRing

ConcurrentHashMap with backing in the router.config file. router.keyring.key.{base64 hash, with = replaced with $}={base64 session key} Caution - not all HashMap methods are overridden.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
PersistentKeyRing(RouterContext ctx)
           
 
Method Summary
 SessionKey put(Hash h, SessionKey sk)
           
 SessionKey remove(Hash h)
           
 void renderStatusHTML(java.io.Writer out)
           
 
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, putAll, putIfAbsent, remove, remove, replace, replace, size, values
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

PersistentKeyRing

public PersistentKeyRing(RouterContext ctx)
Method Detail

put

public SessionKey put(Hash h,
                      SessionKey sk)
Specified by:
put in interface java.util.Map<Hash,SessionKey>
Overrides:
put in class java.util.concurrent.ConcurrentHashMap<Hash,SessionKey>

remove

public SessionKey remove(Hash h)

renderStatusHTML

public void renderStatusHTML(java.io.Writer out)
                      throws java.io.IOException
Overrides:
renderStatusHTML in class KeyRing
Throws:
java.io.IOException