Package org.eclipse.net4j.util.cache

## Class CacheRegistration

- java.lang.Object
- - org.eclipse.net4j.util.cache.CacheRegistration

- All Implemented Interfaces:
    `ICacheProbe`, `ICacheRegistration`

      public class CacheRegistration
      extends java.lang.Object
      implements ICacheRegistration

  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static float` | `DEFAULT_RECONSTRUCTION_COST_DECAY_FACTOR` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CacheRegistration​(ICacheMonitor cacheMonitor, ICache cache)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `dispose()` |
    `void` | `elementCached​(int elementSize)` |
    `void` | `elementEvicted​(int elementSize)` |
    `void` | `elementReconstructed​(long reconstructionTime)` |
    `long` | `getAverageElementSize()` |
    `ICache` | `getCache()` |
    `ICacheMonitor` | `getCacheMonitor()` |
    `long` | `getCacheSize()` |
    `int` | `getElementCount()` |
    `long` | `getReconstructionCost()` |
    `protected float` | `getReconstructionCostDecayFactor()` |
    `boolean` | `isDisposed()` |

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

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

- - ### Field Detail

    - #### DEFAULT_RECONSTRUCTION_COST_DECAY_FACTOR

          public static final float DEFAULT_RECONSTRUCTION_COST_DECAY_FACTOR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CacheRegistration

          public CacheRegistration​(ICacheMonitor cacheMonitor,
                                   ICache cache)

  - ### Method Detail

    - #### dispose

          public void dispose()

      Specified by:
        `dispose` in interface `ICacheRegistration`

    - #### isDisposed

          public boolean isDisposed()

      Specified by:
        `isDisposed` in interface `ICacheProbe`

    - #### getCacheMonitor

          public ICacheMonitor getCacheMonitor()

      Specified by:
        `getCacheMonitor` in interface `ICacheRegistration`

    - #### getCache

          public ICache getCache()

      Specified by:
        `getCache` in interface `ICacheRegistration`

    - #### getElementCount

          public int getElementCount()

      Specified by:
        `getElementCount` in interface `ICacheProbe`

    - #### getCacheSize

          public long getCacheSize()

      Specified by:
        `getCacheSize` in interface `ICacheProbe`

    - #### getAverageElementSize

          public long getAverageElementSize()

      Specified by:
        `getAverageElementSize` in interface `ICacheProbe`

    - #### getReconstructionCost

          public long getReconstructionCost()

      Specified by:
        `getReconstructionCost` in interface `ICacheProbe`

    - #### elementCached

          public void elementCached​(int elementSize)

      Specified by:
        `elementCached` in interface `ICacheProbe`

    - #### elementEvicted

          public void elementEvicted​(int elementSize)

      Specified by:
        `elementEvicted` in interface `ICacheProbe`

    - #### elementReconstructed

          public void elementReconstructed​(long reconstructionTime)

      Specified by:
        `elementReconstructed` in interface `ICacheProbe`

    - #### getReconstructionCostDecayFactor

          protected float getReconstructionCostDecayFactor()