[jboss-cvs] JBossCache/src/org/jboss/cache/pojo/interceptors ...
Jason Thomas Greene
jgreene at jboss.com
Wed Jun 27 20:56:06 EDT 2007
User: jgreene
Date: 07/06/27 20:56:06
Modified: src/org/jboss/cache/pojo/interceptors
AbstractInterceptor.java PojoTxLockInterceptor.java
StaticFieldInterceptor.java
Log:
Reduce dependency on CacheSPI
Revision Changes Path
1.3 +3 -3 JBossCache/src/org/jboss/cache/pojo/interceptors/AbstractInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/interceptors/AbstractInterceptor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- AbstractInterceptor.java 23 May 2007 10:28:56 -0000 1.2
+++ AbstractInterceptor.java 28 Jun 2007 00:56:06 -0000 1.3
@@ -19,7 +19,7 @@
* Base interceptor class for PojoCache interceptor stack.
*
* @author Ben Wang
- * @version $Id: AbstractInterceptor.java,v 1.2 2007/05/23 10:28:56 msurtani Exp $
+ * @version $Id: AbstractInterceptor.java,v 1.3 2007/06/28 00:56:06 jgreene Exp $
*/
public abstract class AbstractInterceptor implements Interceptor
{
@@ -27,12 +27,12 @@
protected InvocationContext getInvocationContext(MethodInvocation in)
{
- return ((PojoCacheImpl) in.getTargetObject()).getUnderlyingCache().getInvocationContext();
+ return ((PojoCacheImpl) in.getTargetObject()).getCacheSPI().getInvocationContext();
}
protected CacheSPI getCache(MethodInvocation in)
{
- return ((PojoCacheImpl) in.getTargetObject()).getUnderlyingCache();
+ return ((PojoCacheImpl) in.getTargetObject()).getCacheSPI();
}
public String getName()
1.4 +4 -3 JBossCache/src/org/jboss/cache/pojo/interceptors/PojoTxLockInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PojoTxLockInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/interceptors/PojoTxLockInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- PojoTxLockInterceptor.java 30 May 2007 06:08:02 -0000 1.3
+++ PojoTxLockInterceptor.java 28 Jun 2007 00:56:06 -0000 1.4
@@ -9,6 +9,7 @@
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.cache.Cache;
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
@@ -20,7 +21,7 @@
* Interceptor that handles the parent node lock associated with transaction.
*
* @author Ben Wang
- * @version $Id: PojoTxLockInterceptor.java,v 1.3 2007/05/30 06:08:02 jgreene Exp $
+ * @version $Id: PojoTxLockInterceptor.java,v 1.4 2007/06/28 00:56:06 jgreene Exp $
*/
public class PojoTxLockInterceptor extends AbstractInterceptor
{
@@ -45,7 +46,7 @@
private void handleLock(MethodInvocation invocation) throws Throwable
{
Fqn id = (Fqn) invocation.getArguments()[0];
- CacheSPI cache = getCache(invocation);
+ Cache<Object, Object> cache = getCache(invocation);
// Object owner = cache.getLockOwner();
Object owner = null;
if (!lockPojo(owner, id, cache))
@@ -54,7 +55,7 @@
}
}
- private boolean lockPojo(Object owner, Fqn id, CacheSPI cache) throws CacheException
+ private boolean lockPojo(Object owner, Fqn id, Cache<Object, Object> cache) throws CacheException
{
if (log.isDebugEnabled())
{
1.4 +0 -1 JBossCache/src/org/jboss/cache/pojo/interceptors/StaticFieldInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: StaticFieldInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/interceptors/StaticFieldInterceptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- StaticFieldInterceptor.java 30 May 2007 06:08:02 -0000 1.3
+++ StaticFieldInterceptor.java 28 Jun 2007 00:56:06 -0000 1.4
@@ -26,7 +26,6 @@
public class StaticFieldInterceptor implements Interceptor
{
private final Log log_ = LogFactory.getLog(StaticFieldInterceptor.class);
- private CacheSPI cache_;
private PojoCacheImpl pCache_;
private Fqn fqn_;
private String name_;
More information about the jboss-cvs-commits
mailing list