net.i2p.sam

## Class SessionsDB

- java.lang.Object
- - net.i2p.sam.SessionsDB

-     class SessionsDB
      extends Object

  basically a HashMap from String to SessionRecord

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) static class` | `SessionsDB.ExistingDestException` Exception thrown when attempting to create a session with an existing destination.
    `(package private) static class` | `SessionsDB.ExistingIdException` Exception thrown when attempting to create a session with an existing ID.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SessionsDB()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsKey(String nick)`
    `boolean` | `del(String nick)`
    `SessionRecord` | `get(String nick)`
    `void` | `put(String nick, SessionRecord session)`
    `void` | `putDupDestOK(String nick, SessionRecord session)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SessionsDB

          public SessionsDB()

  - ### Method Detail

    - #### containsKey

          public boolean containsKey(String nick)

    - #### del

          public boolean del(String nick)

      Returns:
        true if removed

    - #### get

          public SessionRecord get(String nick)

    - #### put

          public void put(String nick,
                          SessionRecord session)
                   throws SessionsDB.ExistingIdException,
                          SessionsDB.ExistingDestException

      Throws:
        `SessionsDB.ExistingIdException`
        `SessionsDB.ExistingDestException`

    - #### putDupDestOK

          public void putDupDestOK(String nick,
                                   SessionRecord session)
                            throws SessionsDB.ExistingIdException

      Throws:
        `SessionsDB.ExistingIdException`