@Override
public InvocationContext createRemoteInvocationContextForCommand(VisitableCommand cacheCommand, Address origin) {
InvocationContext context = createRemoteInvocationContext(origin);
if (cacheCommand != null && cacheCommand instanceof FlagAffectedCommand) {
FlagAffectedCommand command = (FlagAffectedCommand) cacheCommand;
Set<Flag> flags = command.getFlags();
if (flags != null && !flags.isEmpty()) {
context = new InvocationContextFlagsOverride(context, flags);
ctxHolder.set(context);
}
}