Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.mina.util
Class ExpiringMap<K,V>

    java.lang.Object
      org.apache.mina.util.ExpiringMap<K,V>

All Implemented Interfaces:
  Map<K,V>

    public class ExpiringMap<K,V>

extends Object
implements Map<K,V>

A map with expiration.

Author:
  The Apache Directory Project (mina-dev@directory.apache.org)

Nested Class Summary
`class` | `ExpiringMap.Expirer`

Nested classes/interfaces inherited from interface java.util.Map
`Map.Entry<K,V>`

Field Summary
`static int` | `DEFAULT_EXPIRATION_INTERVAL`
`static int` | `DEFAULT_TIME_TO_LIVE`

Constructor Summary
`ExpiringMap()`
`ExpiringMap(int timeToLive)`
`ExpiringMap(int timeToLive, int expirationInterval)`

Method Summary
`void` | `addExpirationListener(ExpirationListener<? extends V> listener)`
`void` | `clear()`
`boolean` | `containsKey(Object key)`
`boolean` | `containsValue(Object value)`
`Set<Map.Entry<K,V>>` | `entrySet()`
`boolean` | `equals(Object obj)`
`V` | `get(Object key)`
`int` | `getExpirationInterval()`
`ExpiringMap.Expirer` | `getExpirer()`
`int` | `getTimeToLive()`
`int` | `hashCode()`
`boolean` | `isEmpty()`
`Set<K>` | `keySet()`
`V` | `put(K key, V value)`
`void` | `putAll(Map<? extends K,? extends V> inMap)`
`V` | `remove(Object key)`
`void` | `removeExpirationListener(ExpirationListener<? extends V> listener)`
`void` | `setExpirationInterval(int expirationInterval)`
`void` | `setTimeToLive(int timeToLive)`
`int` | `size()`
`Collection<V>` | `values()`

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

Field Detail

### DEFAULT_TIME_TO_LIVE

    public static final int DEFAULT_TIME_TO_LIVE

See Also:
  Constant Field Values

### DEFAULT_EXPIRATION_INTERVAL

    public static final int DEFAULT_EXPIRATION_INTERVAL

See Also:
  Constant Field Values

Constructor Detail

### ExpiringMap

    public ExpiringMap()

### ExpiringMap

    public ExpiringMap(int timeToLive)

### ExpiringMap

    public ExpiringMap(int timeToLive,
                       int expirationInterval)

Method Detail

### put

    public V put(K key,
                 V value)

  Specified by:
    `put` in interface `Map<K,V>`

### get

    public V get(Object key)

  Specified by:
    `get` in interface `Map<K,V>`

### remove

    public V remove(Object key)

  Specified by:
    `remove` in interface `Map<K,V>`

### containsKey

    public boolean containsKey(Object key)

  Specified by:
    `containsKey` in interface `Map<K,V>`

### containsValue

    public boolean containsValue(Object value)

  Specified by:
    `containsValue` in interface `Map<K,V>`

### size

    public int size()

  Specified by:
    `size` in interface `Map<K,V>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Map<K,V>`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Map<K,V>`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `Map<K,V>`
  Overrides:
    `hashCode` in class `Object`

### keySet

    public Set<K> keySet()

  Specified by:
    `keySet` in interface `Map<K,V>`

### equals

    public boolean equals(Object obj)

  Specified by:
    `equals` in interface `Map<K,V>`
  Overrides:
    `equals` in class `Object`

### putAll

    public void putAll(Map<? extends K,? extends V> inMap)

  Specified by:
    `putAll` in interface `Map<K,V>`

### values

    public Collection<V> values()

  Specified by:
    `values` in interface `Map<K,V>`

### entrySet

    public Set<Map.Entry<K,V>> entrySet()

  Specified by:
    `entrySet` in interface `Map<K,V>`

### addExpirationListener

    public void addExpirationListener(ExpirationListener<? extends V> listener)

### removeExpirationListener

    public void removeExpirationListener(ExpirationListener<? extends V> listener)

### getExpirer

    public ExpiringMap.Expirer getExpirer()

### getExpirationInterval

    public int getExpirationInterval()

### getTimeToLive

    public int getTimeToLive()

### setExpirationInterval

    public void setExpirationInterval(int expirationInterval)

### setTimeToLive

    public void setTimeToLive(int timeToLive)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.