this.icc = icc;
}
protected final Object processVisitableCommand(ReplicableCommand cacheCommand) throws Throwable {
if (cacheCommand instanceof VisitableCommand) {
VisitableCommand vc = (VisitableCommand) cacheCommand;
final InvocationContext ctx;
if (vc instanceof FlagAffectedCommand) {
ctx = icc.createRemoteInvocationContextForCommand(vc);
}
else {
ctx = icc.createRemoteInvocationContext();
}
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;