## net.i2p.client.naming
Class AddressDB

    java.lang.Object
      net.i2p.client.naming.AddressDB

Direct Known Subclasses:
  DummyAddressDB, FilesystemAddressDB

    public abstract class AddressDB

extends java.lang.Object

Field Summary
`protected I2PAppContext` `_context`
`static java.lang.String` `PROP_IMPL` what classname should be used as the address db impl?

Constructor Summary
`protected` `AddressDB(I2PAppContext context)` The address db should only be constructed and accessed through the application context.

Method Summary
`abstract boolean` `contains(Address address)`
`abstract boolean` `contains(java.lang.String hostname)`
`static AddressDB` `createInstance(I2PAppContext context)` Get an address db instance.
`abstract Address` `get(java.lang.String hostname)`
`abstract java.util.Collection` `hostnames()`
`abstract Address` `put(Address address)`
`abstract Address` `remove(Address address)`
`abstract Address` `remove(java.lang.String hostname)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _context

    protected I2PAppContext _context

### PROP_IMPL

    public static final java.lang.String PROP_IMPL

  what classname should be used as the address db impl?

  See Also:
    Constant Field Values

Constructor Detail

### AddressDB

    protected AddressDB(I2PAppContext context)

  The address db should only be constructed and accessed through the application context. This constructor should only be used by the appropriate application context itself.

Method Detail

### createInstance

    public static final AddressDB createInstance(I2PAppContext context)

  Get an address db instance. This method ensures that there will be only one address db instance (singleton) as well as choose the implementation from the "i2p.addressdb.impl" system property.

### get

    public abstract Address get(java.lang.String hostname)

### put

    public abstract Address put(Address address)

### remove

    public abstract Address remove(java.lang.String hostname)

### remove

    public abstract Address remove(Address address)

### contains

    public abstract boolean contains(Address address)

### contains

    public abstract boolean contains(java.lang.String hostname)

### hostnames

    public abstract java.util.Collection hostnames()