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 ScopeEventListenerImpl

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

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

public class ScopeEventListenerImpl
extends java.lang.Object
implements ScopeEventListener

Implementation of a ScopeEventListener that keeps track of the scope flush events. 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.2 $
Author:
  Alain Bergevin

Field Summary
`static int` | `APPLICATION_SCOPE` Application scope number
`static int` | `NB_SCOPES` Number of known scopes
`static int` | `PAGE_SCOPE` Page scope number
`static int` | `REQUEST_SCOPE` Request scope number
`static int` | `SESSION_SCOPE` Session scope number

Constructor Summary
`ScopeEventListenerImpl()`

Method Summary
`int` | `getApplicationScopeFlushCount()` Gets the flush count for scope `APPLICATION_SCOPE`.
`int` | `getPageScopeFlushCount()` Gets the flush count for scope `PAGE_SCOPE`.
`int` | `getRequestScopeFlushCount()` Gets the flush count for scope `REQUEST_SCOPE`.
`int` | `getSessionScopeFlushCount()` Gets the flush count for scope `SESSION_SCOPE`.
`int` | `getTotalScopeFlushCount()` Returns the total flush count.
`void` | `scopeFlushed(ScopeEvent event)` Handles all the scope flush events.
`java.lang.String` | `toString()` Returns all the flush counter in a string form.

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

Field Detail

### NB_SCOPES

    public static final int NB_SCOPES

  Number of known scopes

  See Also:
    Constant Field Values

### PAGE_SCOPE

    public static final int PAGE_SCOPE

  Page scope number

  See Also:
    Constant Field Values

### REQUEST_SCOPE

    public static final int REQUEST_SCOPE

  Request scope number

  See Also:
    Constant Field Values

### SESSION_SCOPE

    public static final int SESSION_SCOPE

  Session scope number

  See Also:
    Constant Field Values

### APPLICATION_SCOPE

    public static final int APPLICATION_SCOPE

  Application scope number

  See Also:
    Constant Field Values

Constructor Detail

### ScopeEventListenerImpl

    public ScopeEventListenerImpl()

Method Detail

### getApplicationScopeFlushCount

    public int getApplicationScopeFlushCount()

  Gets the flush count for scope `APPLICATION_SCOPE`.

  Returns:
    The total number of application flush

### getPageScopeFlushCount

    public int getPageScopeFlushCount()

  Gets the flush count for scope `PAGE_SCOPE`.

  Returns:
    The total number of page flush

### getRequestScopeFlushCount

    public int getRequestScopeFlushCount()

  Gets the flush count for scope `REQUEST_SCOPE`.

  Returns:
    The total number of request flush

### getSessionScopeFlushCount

    public int getSessionScopeFlushCount()

  Gets the flush count for scope `SESSION_SCOPE`.

  Returns:
    The total number of session flush

### getTotalScopeFlushCount

    public int getTotalScopeFlushCount()

  Returns the total flush count.

  Returns:
    The total number of scope flush

### scopeFlushed

    public void scopeFlushed(ScopeEvent event)

  Handles all the scope flush events.

  Specified by:
    `scopeFlushed` in interface `ScopeEventListener`
  Parameters:
    `event` - The scope event

### toString

    public java.lang.String toString()

  Returns all the flush counter 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