cascading.util.cache

## Class OrderedHashMapCache<Key,Value>

- java.lang.Object
- - cascading.util.cache.OrderedHashMapCache<Key,Value>

- All Implemented Interfaces:
    CascadingCache<Key,Value>, Map<Key,Value>

      public class OrderedHashMapCache<Key,Value>
      extends Object
      implements CascadingCache<Key,Value>

  Implementation of the `CascadingCache` interface backed by a `LinkedHashMap`. This implementation is used by default by `Unique` and `AggregateBy` and their subclasses.
  See Also:
    `Unique`, `AggregateBy`, `DirectMappedCacheFactory`, `OrderedHashMapCacheFactory`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OrderedHashMapCache()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `boolean` | `containsKey(Object key)`
    `boolean` | `containsValue(Object value)`
    `Set<Map.Entry<Key,Value>>` | `entrySet()`
    `Value` | `get(Object key)`
    `int` | `getCapacity()` Returns the capacity of this cache.
    `void` | `initialize()` Method to initialize the Cache.
    `boolean` | `isEmpty()`
    `Set<Key>` | `keySet()`
    `Value` | `put(Key key, Value value)`
    `void` | `putAll(Map<? extends Key,? extends Value> m)`
    `Value` | `remove(Object key)`
    `void` | `setCacheEvictionCallback(CacheEvictionCallback cacheEvictionCallback)` Sets the `CacheEvictionCallback` of this Cache.
    `void` | `setCapacity(int capacity)` Sets the capacity of the Cache.
    `int` | `size()`
    `Collection<Value>` | `values()`

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

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

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### OrderedHashMapCache

          public OrderedHashMapCache()

  - ### Method Detail

    - #### getCapacity

          public int getCapacity()

      Description copied from interface: `CascadingCache`
      Returns the capacity of this cache.
      Specified by:
        `getCapacity` in interface `CascadingCache<Key,Value>`

    - #### setCacheEvictionCallback

          public void setCacheEvictionCallback(CacheEvictionCallback cacheEvictionCallback)

      Description copied from interface: `CascadingCache`
      Sets the `CacheEvictionCallback` of this Cache.
      Specified by:
        `setCacheEvictionCallback` in interface `CascadingCache<Key,Value>`

    - #### setCapacity

          public void setCapacity(int capacity)

      Description copied from interface: `CascadingCache`
      Sets the capacity of the Cache.
      Specified by:
        `setCapacity` in interface `CascadingCache<Key,Value>`

    - #### initialize

          public void initialize()

      Description copied from interface: `CascadingCache`
      Method to initialize the Cache. Any setup should be done in here.
      Specified by:
        `initialize` in interface `CascadingCache<Key,Value>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Map<Key,Value>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `Map<Key,Value>`

    - #### containsKey

          public boolean containsKey(Object key)

      Specified by:
        `containsKey` in interface `Map<Key,Value>`

    - #### containsValue

          public boolean containsValue(Object value)

      Specified by:
        `containsValue` in interface `Map<Key,Value>`

    - #### get

          public Value get(Object key)

      Specified by:
        `get` in interface `Map<Key,Value>`

    - #### put

          public Value put(Key key,
                  Value value)

      Specified by:
        `put` in interface `Map<Key,Value>`

    - #### remove

          public Value remove(Object key)

      Specified by:
        `remove` in interface `Map<Key,Value>`

    - #### putAll

          public void putAll(Map<? extends Key,? extends Value> m)

      Specified by:
        `putAll` in interface `Map<Key,Value>`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `Map<Key,Value>`

    - #### keySet

          public Set<Key> keySet()

      Specified by:
        `keySet` in interface `Map<Key,Value>`

    - #### values

          public Collection<Value> values()

      Specified by:
        `values` in interface `Map<Key,Value>`

    - #### entrySet

          public Set<Map.Entry<Key,Value>> entrySet()

      Specified by:
        `entrySet` in interface `Map<Key,Value>`

Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.