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

## org.jboss.cache.interceptors
Class Interceptor

    java.lang.Object
      org.jboss.cache.interceptors.Interceptor

All Implemented Interfaces:
  InterceptorMBean

Direct Known Subclasses:
  BaseCacheLoaderInterceptor, BaseInterceptor, BaseRpcInterceptor, CacheMgmtInterceptor, CallInterceptor, CreateIfNotExistsInterceptor, EvictionInterceptor, OptimisticInterceptor, PassivationInterceptor, PessimisticLockInterceptor, TxInterceptor, UnlockInterceptor

    public abstract class Interceptor

extends java.lang.Object
implements InterceptorMBean

Class representing an interceptor. Note that this will be replaced by `Interceptor` in one of the next releases

Version:
  $Id: Interceptor.java,v 1.15 2006/06/06 10:17:14 msurtani Exp $
Author:
  Bela Ban

Constructor Summary
`Interceptor()`

Method Summary
`java.util.Map` | `dumpStatistics()` Returns a map of the cache interceptor's statistics Map elements consist of {String name, Object value} entries
`InvocationContext` | `getInvocationContext()` Retrieves an InvocationContext.
`Interceptor` | `getNext()`
`boolean` | `getStatisticsEnabled()` Returns whether an interceptor's statistics are being captured.
`java.lang.Object` | `invoke(org.jgroups.blocks.MethodCall m)`
`protected boolean` | `isActive(javax.transaction.Transaction tx)` Returns true if transaction is ACTIVE, false otherwise
`protected boolean` | `isBuddyGroupOrganisationMethod(JBCMethodCall mc)`
`protected boolean` | `isOnePhaseCommitPrepareMehod(JBCMethodCall m)` This only works for prepare() and optimisticPrepare() method calls.
`protected boolean` | `isPreparing(javax.transaction.Transaction tx)` Returns true if transaction is PREPARING, false otherwise
`protected boolean` | `isTransactionLifecycleMethod(JBCMethodCall mc)`
`protected boolean` | `isValid(javax.transaction.Transaction tx)` Return s true of tx's status is ACTIVE or PREPARING
`void` | `resetStatistics()` Resets an interceptor's cache statistics
`void` | `setCache(TreeCache cache)`
`void` | `setInvocationContext(InvocationContext invocationContext)` Sets the invocation context
`void` | `setNext(Interceptor i)`
`void` | `setStatisticsEnabled(boolean enabled)` Enables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.

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

Constructor Detail

### Interceptor

    public Interceptor()

Method Detail

### setNext

    public void setNext(Interceptor i)

### getNext

    public Interceptor getNext()

### setCache

    public void setCache(TreeCache cache)

### invoke

    public java.lang.Object invoke(org.jgroups.blocks.MethodCall m)
                            throws java.lang.Throwable

  Throws:
    `java.lang.Throwable`

### getStatisticsEnabled

    public boolean getStatisticsEnabled()

  Description copied from interface: `InterceptorMBean`
  Returns whether an interceptor's statistics are being captured.

  Specified by:
    `getStatisticsEnabled` in interface `InterceptorMBean`
  Returns:
    true if statistics are captured

### setStatisticsEnabled

    public void setStatisticsEnabled(boolean enabled)

  Description copied from interface: `InterceptorMBean`
  Enables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.

  Specified by:
    `setStatisticsEnabled` in interface `InterceptorMBean`
  Parameters:
    `enabled` - true if statistics should be captured

### dumpStatistics

    public java.util.Map dumpStatistics()

  Description copied from interface: `InterceptorMBean`
  Returns a map of the cache interceptor's statistics Map elements consist of {String name, Object value} entries

  Specified by:
    `dumpStatistics` in interface `InterceptorMBean`
  Returns:
    a map containing statistics

### resetStatistics

    public void resetStatistics()

  Description copied from interface: `InterceptorMBean`
  Resets an interceptor's cache statistics

  Specified by:
    `resetStatistics` in interface `InterceptorMBean`

### isActive

    protected boolean isActive(javax.transaction.Transaction tx)

  Returns true if transaction is ACTIVE, false otherwise

### isPreparing

    protected boolean isPreparing(javax.transaction.Transaction tx)

  Returns true if transaction is PREPARING, false otherwise

### isValid

    protected boolean isValid(javax.transaction.Transaction tx)

  Return s true of tx's status is ACTIVE or PREPARING

  Parameters:
    `tx` -
  Returns:
    true if the tx is active or preparing

### setInvocationContext

    public void setInvocationContext(InvocationContext invocationContext)

  Sets the invocation context

  Parameters:
    `invocationContext` -

### getInvocationContext

    public InvocationContext getInvocationContext()

  Retrieves an InvocationContext.

  Returns:
    the context for the current invocation

### isOnePhaseCommitPrepareMehod

    protected boolean isOnePhaseCommitPrepareMehod(JBCMethodCall m)

  This only works for prepare() and optimisticPrepare() method calls.

  Parameters:
    `m` -

### isTransactionLifecycleMethod

    protected boolean isTransactionLifecycleMethod(JBCMethodCall mc)

### isBuddyGroupOrganisationMethod

    protected boolean isBuddyGroupOrganisationMethod(JBCMethodCall mc)

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

Copyright © 1998-2005 JBoss Inc . All Rights Reserved.