Author: manik.surtani(a)jboss.com
Date: 2008-06-25 14:35:22 -0400 (Wed, 25 Jun 2008)
New Revision: 6047
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java
Log:
Added comments and TODOs
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java 2008-06-25
18:31:09 UTC (rev 6046)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/MVCCLockingInterceptor.java 2008-06-25
18:35:22 UTC (rev 6047)
@@ -93,30 +93,35 @@
@Override
public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand
command) throws Throwable
{
+ // TODO : Handle this properly
return handleWriteCommand(ctx, command, new ArrayList<Fqn>(1),
Collections.singletonList(command.getFqn()));
}
@Override
public Object handleClearDataCommand(InvocationContext ctx, ClearDataCommand command)
throws Throwable
{
+ // TODO : Handle this properly
return handleWriteCommand(ctx, command, new ArrayList<Fqn>(1),
Collections.singletonList(command.getFqn()));
}
@Override
public Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command)
throws Throwable
{
+ // TODO : Handle this properly
return handleWriteCommand(ctx, command, new ArrayList<Fqn>(1),
Collections.singletonList(command.getFqn()));
}
@Override
public Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand
command) throws Throwable
{
+ // TODO : Handle this properly
return handleWriteCommand(ctx, command, new ArrayList<Fqn>(1),
Collections.singletonList(command.getFqn()));
}
@Override
public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command)
throws Throwable
{
+ // TODO : Handle this properly
return handleWriteCommand(ctx, command, new ArrayList<Fqn>(1),
Collections.singletonList(command.getFqn()));
}
@@ -159,6 +164,7 @@
@Override
public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws
Throwable
{
+ // TODO : Handle this properly
List<Fqn> list = new ArrayList<Fqn>();
list.add(command.getFqn());
list.add(command.getTo());
@@ -213,6 +219,7 @@
// for non-transactional stuff.
if (ctx.getTransaction() == null)
{
+ if (trace) log.trace("Releasing locks for thread " +
Thread.currentThread());
List<Fqn> locks;
if (!(locks = ctx.getLocks()).isEmpty())
{
@@ -239,6 +246,7 @@
{
if (ctx.getTransaction() != null)
{
+ if (trace) log.trace("Releasing locks for transaction " +
ctx.getGlobalTransaction());
List<Fqn> locks;
if (!(locks = ctx.getTransactionContext().getLocks()).isEmpty())
{
@@ -289,6 +297,7 @@
return invokeNextInterceptor(ctx, command);
}
+ // TODO : this method is probably unnecessary
protected Object handleWriteCommand(InvocationContext ctx, VisitableCommand command,
List<Fqn> fqnsToRead, List<Fqn> fqnsToWrite) throws Throwable
{
for (Fqn f : fqnsToRead)
Show replies by date