org.jboss.jca.adapters.jdbc.util

## Class LRUCache.LRUList

- java.lang.Object
- - org.jboss.jca.adapters.jdbc.util.LRUCache.LRUList

- Enclosing class:
    LRUCache<K,V>

      public class LRUCache.LRUList
      extends java.lang.Object

  Double queued list used to store cache entries.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `LRUList()` Creates a new double queued list.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `capacityChanged(int oldCapacity)` Callback that signals that the capacity of the cache is changed.
    `protected void` | `clear()` Clear
    `protected void` | `demote()` Demotes from the cache the least used entry.
    `protected void` | `entryAdded(LRUCache.LRUCacheEntry<K,V> entry)` Callback that signals that the given entry has been added to the cache.
    `protected void` | `entryCacheMiss()` Entry cache miss
    `protected void` | `entryPromotion(LRUCache.LRUCacheEntry<K,V> entry)` Callback that signals that the given entry is just about to be added.
    `protected void` | `entryRemoved(LRUCache.LRUCacheEntry<K,V> entry)` Callback that signals that the given entry has been removed from the cache.
    `protected void` | `promote(LRUCache.LRUCacheEntry<K,V> entry)` Promotes the cache entry `entry` to the last used position of the list.
    `protected void` | `remove(LRUCache.LRUCacheEntry<K,V> entry)` Removes from the cache list the specified entry.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### LRUList

          protected LRUList()

      Creates a new double queued list.

  - ### Method Detail

    - #### promote

          protected void promote(LRUCache.LRUCacheEntry<K,V> entry)

      Promotes the cache entry `entry` to the last used position of the list.
      If the object is already there, does nothing.
      Parameters:
        `entry` - the object to be promoted, cannot be null
      Throws:
        `java.lang.IllegalStateException` - if this method is called with a full cache
      See Also:
        `demote()`

    - #### demote

          protected void demote()

      Demotes from the cache the least used entry.
      If the cache is not full, does nothing.
      See Also:
        `promote(org.jboss.jca.adapters.jdbc.util.LRUCache<K, V>.LRUCacheEntry<K, V>)`

    - #### remove

          protected void remove(LRUCache.LRUCacheEntry<K,V> entry)

      Removes from the cache list the specified entry.
      Parameters:
        `entry` -

    - #### entryPromotion

          protected void entryPromotion(LRUCache.LRUCacheEntry<K,V> entry)

      Callback that signals that the given entry is just about to be added.
      Parameters:
        `entry` -

    - #### entryAdded

          protected void entryAdded(LRUCache.LRUCacheEntry<K,V> entry)

      Callback that signals that the given entry has been added to the cache.
      Parameters:
        `entry` -

    - #### entryRemoved

          protected void entryRemoved(LRUCache.LRUCacheEntry<K,V> entry)

      Callback that signals that the given entry has been removed from the cache.
      Parameters:
        `entry` -

    - #### entryCacheMiss

          protected void entryCacheMiss()

      Entry cache miss

    - #### capacityChanged

          protected void capacityChanged(int oldCapacity)

      Callback that signals that the capacity of the cache is changed.
      Parameters:
        `oldCapacity` - the capacity before the change happened

    - #### clear

          protected void clear()

      Clear

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)