}
protected final Object processVisitableCommand(ReplicableCommand cacheCommand) throws Throwable {
if (cacheCommand instanceof VisitableCommand) {
InvocationContext ctx = icc.createRemoteInvocationContext();
VisitableCommand vc = (VisitableCommand) cacheCommand;
if (vc.shouldInvoke(ctx)) {
if (trace) log.trace("Invoking command " + cacheCommand + ", with originLocal flag set to " + ctx.isOriginLocal() + ".");
return interceptorChain.invoke(ctx, vc);
} else {
if (trace) log.trace("Not invoking command " + cacheCommand + " since shouldInvoke() returned false with context " + ctx);
return null;