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

## com.opensymphony.oscache.extra
Class CacheEntryEventListenerImpl

    java.lang.Object
      com.opensymphony.oscache.extra.CacheEntryEventListenerImpl

All Implemented Interfaces:
  CacheEntryEventListener, CacheEventListener, java.util.EventListener

public class CacheEntryEventListenerImpl
extends java.lang.Object
implements CacheEntryEventListener

Implementation of a CacheEntryEventListener. It use the events to count the operations performed on the cache.

We are not using any synchronized so that this does not become a bottleneck. The consequence is that on retrieving values, the operations that are currently being done won't be counted.

Version:
  $Revision: 1.1 $
Author:
  Alain Bergevin, Chris Miller

Constructor Summary
`CacheEntryEventListenerImpl()` Constructor, empty for us

Method Summary
`void` | `cacheEntryAdded(CacheEntryEvent event)` Handles the event fired when an entry is added in the cache.
`void` | `cacheEntryFlushed(CacheEntryEvent event)` Handles the event fired when an entry is flushed from the cache.
`void` | `cacheEntryRemoved(CacheEntryEvent event)` Handles the event fired when an entry is removed from the cache.
`void` | `cacheEntryUpdated(CacheEntryEvent event)` Handles the event fired when an entry is updated in the cache.
`void` | `cacheFlushed(CachewideEvent event)` Handles the event fired when a cache flush occurs.
`void` | `cacheGroupFlushed(CacheGroupEvent event)` Handles the event fired when a group is flushed from the cache.
`void` | `cachePatternFlushed(CachePatternEvent event)` Handles the event fired when a pattern is flushed from the cache.
`int` | `getCacheFlushedCount()` Gets the cache flush counter
`int` | `getEntryAddedCount()` Gets the add counter
`int` | `getEntryFlushedCount()` Gets the flushed counter
`int` | `getEntryRemovedCount()` Gets the removed counter
`int` | `getEntryUpdatedCount()` Gets the updated counter
`int` | `getGroupFlushedCount()` Gets the group flush counter
`int` | `getPatternFlushedCount()` Gets the pattern flush counter
`java.lang.String` | `toString()` Returns the internal values in a string form

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

Constructor Detail

### CacheEntryEventListenerImpl

    public CacheEntryEventListenerImpl()

  Constructor, empty for us

Method Detail

### getEntryAddedCount

    public int getEntryAddedCount()

  Gets the add counter

  Returns:
    The added counter

### getEntryFlushedCount

    public int getEntryFlushedCount()

  Gets the flushed counter

  Returns:
    The flushed counter

### getEntryRemovedCount

    public int getEntryRemovedCount()

  Gets the removed counter

  Returns:
    The removed counter

### getEntryUpdatedCount

    public int getEntryUpdatedCount()

  Gets the updated counter

  Returns:
    The updated counter

### getGroupFlushedCount

    public int getGroupFlushedCount()

  Gets the group flush counter

  Returns:
    The number of group flush calls that have occurred

### getPatternFlushedCount

    public int getPatternFlushedCount()

  Gets the pattern flush counter

  Returns:
    The number of pattern flush calls that have occurred

### getCacheFlushedCount

    public int getCacheFlushedCount()

  Gets the cache flush counter

  Returns:
    The number of times the entire cache has been flushed

### cacheEntryAdded

    public void cacheEntryAdded(CacheEntryEvent event)

  Handles the event fired when an entry is added in the cache.

  Specified by:
    `cacheEntryAdded` in interface `CacheEntryEventListener`
  Parameters:
    `event` - The event triggered when a cache entry has been added

### cacheEntryFlushed

    public void cacheEntryFlushed(CacheEntryEvent event)

  Handles the event fired when an entry is flushed from the cache.

  Specified by:
    `cacheEntryFlushed` in interface `CacheEntryEventListener`
  Parameters:
    `event` - The event triggered when a cache entry has been flushed

### cacheEntryRemoved

    public void cacheEntryRemoved(CacheEntryEvent event)

  Handles the event fired when an entry is removed from the cache.

  Specified by:
    `cacheEntryRemoved` in interface `CacheEntryEventListener`
  Parameters:
    `event` - The event triggered when a cache entry has been removed

### cacheEntryUpdated

    public void cacheEntryUpdated(CacheEntryEvent event)

  Handles the event fired when an entry is updated in the cache.

  Specified by:
    `cacheEntryUpdated` in interface `CacheEntryEventListener`
  Parameters:
    `event` - The event triggered when a cache entry has been updated

### cacheGroupFlushed

    public void cacheGroupFlushed(CacheGroupEvent event)

  Handles the event fired when a group is flushed from the cache.

  Specified by:
    `cacheGroupFlushed` in interface `CacheEntryEventListener`
  Parameters:
    `event` - The event triggered when a cache group has been flushed

### cachePatternFlushed

    public void cachePatternFlushed(CachePatternEvent event)

  Handles the event fired when a pattern is flushed from the cache.

  Specified by:
    `cachePatternFlushed` in interface `CacheEntryEventListener`
  Parameters:
    `event` - The event triggered when a cache pattern has been flushed

### cacheFlushed

    public void cacheFlushed(CachewideEvent event)

  Handles the event fired when a cache flush occurs.

  Specified by:
    `cacheFlushed` in interface `CacheEntryEventListener`
  Parameters:
    `event` - The event triggered when an entire cache is flushed

### toString

    public java.lang.String toString()

  Returns the internal values in a string form

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| See www.opensymphony.com for more information.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD