org.jboss.cache.interceptors
Class PessimisticLockInterceptor

java.lang.Object
  extended by org.jboss.cache.interceptors.Interceptor
      extended by org.jboss.cache.interceptors.PessimisticLockInterceptor
All Implemented Interfaces:
InterceptorMBean

public class PessimisticLockInterceptor
extends Interceptor

An interceptor that handles locking. When a TX is associated, we register for TX completion and unlock the locks acquired within the scope of the TX. When no TX is present, we keep track of the locks acquired during the current method and unlock when the method returns.

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

Constructor Summary
PessimisticLockInterceptor()
           
 
Method Summary
 java.lang.Object invoke(org.jgroups.blocks.MethodCall call)
           
 void setCache(TreeCache cache)
           
 
Methods inherited from class org.jboss.cache.interceptors.Interceptor
dumpStatistics, getInvocationContext, getNext, getStatisticsEnabled, isActive, isBuddyGroupOrganisationMethod, isOnePhaseCommitPrepareMehod, isPreparing, isTransactionLifecycleMethod, isValid, resetStatistics, setInvocationContext, setNext, setStatisticsEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PessimisticLockInterceptor

public PessimisticLockInterceptor()
Method Detail

setCache

public void setCache(TreeCache cache)
Overrides:
setCache in class Interceptor

invoke

public java.lang.Object invoke(org.jgroups.blocks.MethodCall call)
                        throws java.lang.Throwable
Overrides:
invoke in class Interceptor
Throws:
java.lang.Throwable


Copyright 1998-2005 JBoss Inc . All Rights Reserved.