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

## kieker.common.util.map
Class BoundedConcurrentHashMap<K,V>

    java.lang.Object
      java.util.AbstractMap<K,V>
          java.util.concurrent.ConcurrentHashMap<K,V>
              kieker.common.util.map.BoundedConcurrentHashMap<K,V>

Type Parameters:
  `K` - The type of the keys.
  `V` - The type of the values.

All Implemented Interfaces:
  Serializable, ConcurrentMap<K,V>, Map<K,V>

    public class BoundedConcurrentHashMap<K,V>

extends ConcurrentHashMap<K,V>

Since:
  1.10
Author:
  Nils Christian Ehmke
See Also:
  Serialized Form

Nested Class Summary
`static class` | `BoundedConcurrentHashMap.BoundedCacheBehaviour`

Nested classes/interfaces inherited from class java.util.AbstractMap
`AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

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

Constructor Summary
`BoundedConcurrentHashMap(BoundedConcurrentHashMap.BoundedCacheBehaviour boundedCacheBehaviour, int maxCacheSize)` Initialize a bounded concurrent hash map.

Method Summary
`V` | `put(K key, V value)` Works like the overriden method, except that `null` is returned, if the given element could not be added due to map limitations.
`V` | `putIfAbsent(K key, V value)` Works like the overriden method, except that `null` is returned, if the given element could not be added due to map limitations.

Methods inherited from class java.util.concurrent.ConcurrentHashMap
`clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, putAll, remove, remove, replace, replace, size, values`

Methods inherited from class java.util.AbstractMap
`equals, hashCode, toString`

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

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### BoundedConcurrentHashMap

    public BoundedConcurrentHashMap(BoundedConcurrentHashMap.BoundedCacheBehaviour boundedCacheBehaviour,
                                    int maxCacheSize)

  Initialize a bounded concurrent hash map.

  Parameters:
    `boundedCacheBehaviour` - set the cache behavior
    `maxCacheSize` - define limit of the cache

Method Detail

### put

    public V put(K key,
                 V value)

  Works like the overriden method, except that `null` is returned, if the given element could not be added due to map limitations.

  Specified by:
    `put` in interface `Map<K,V>`
  Overrides:
    `put` in class `ConcurrentHashMap<K,V>`
  Parameters:
    `key` - key-value
    `value` - the associated value
  Returns:
    the previous value associated with key, or null if there was no mapping for key, or null if the bounds limit was reached

### putIfAbsent

    public V putIfAbsent(K key,
                         V value)

  Works like the overriden method, except that `null` is returned, if the given element could not be added due to map limitations.

  Specified by:
    `putIfAbsent` in interface `ConcurrentMap<K,V>`
  Overrides:
    `putIfAbsent` in class `ConcurrentHashMap<K,V>`
  Parameters:
    `key` - key-value
    `value` - the associated value
  Returns:
    the previous value or null

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

Copyright 2014 Kieker Project, http://kieker-monitoring.net