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