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, getOrigin());
}
else {
ctx = icc.createRemoteInvocationContext(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;