[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
manik at jboss.org
Tue Jul 17 13:39:37 EDT 2007
User: msurtani
Date: 07/07/17 13:39:37
Modified: src/org/jboss/cache CacheImpl.java
Log:
skip cache status check for preloads, blocks and unblocks
Revision Changes Path
1.104 +5 -3 JBossCache/src/org/jboss/cache/CacheImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheImpl.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheImpl.java,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -b -r1.103 -r1.104
--- CacheImpl.java 17 Jul 2007 14:59:10 -0000 1.103
+++ CacheImpl.java 17 Jul 2007 17:39:37 -0000 1.104
@@ -3714,6 +3714,7 @@
log.debug("Block received at " + getLocalAddress());
}
MethodCall m = MethodCallFactory.create(MethodDeclarations.blockChannelLocal);
+ getInvocationContext().getOptionOverrides().setSkipCacheStatusCheck(true);
invokeMethod(m, true);
if (log.isDebugEnabled())
{
@@ -3731,6 +3732,7 @@
log.debug("UnBlock received at " + getLocalAddress());
}
MethodCall m = MethodCallFactory.create(MethodDeclarations.unblockChannelLocal);
+ getInvocationContext().getOptionOverrides().setSkipCacheStatusCheck(true);
invokeMethod(m, true);
if (log.isDebugEnabled())
{
@@ -3889,12 +3891,12 @@
*/
protected Object invokeMethod(MethodCall m, boolean originLocal) throws CacheException
{
+ // don't create a new one; get it from ThreadLocal just this once, in case a user has added any overrides.
+ InvocationContext ctx = getInvocationContext();
- if (!cacheStatus.allowInvocations())
+ if (!cacheStatus.allowInvocations() && !ctx.getOptionOverrides().isSkipCacheStatusCheck())
throw new IllegalStateException("Cache not in STARTED state!");
- // don't create a new one; get it from ThreadLocal just this once, in case a user has added any overrides.
- InvocationContext ctx = getInvocationContext();
MethodCall oldCall = null;
try
{
More information about the jboss-cvs-commits
mailing list