use of org.infinispan.interceptors.distribution.WriteManyCommandHelper in project infinispan by infinispan.
the class AnchoredDistributionInterceptor method handleReadWriteManyCommand.
@Override
protected <C extends WriteCommand, Container, Item> Object handleReadWriteManyCommand(InvocationContext ctx, C command, WriteManyCommandHelper<C, Item, Container> helper) throws Exception {
WriteManyCommandHelper wrappedHelper = new AbstractDelegatingWriteManyCommandHelper(helper) {
@Override
public WriteCommand copyForBackup(WriteCommand cmd, LocalizedCacheTopology topology, Address target, IntSet segments) {
WriteCommand backupCommand = helper.copyForBackup(cmd, topology, target, segments);
CommandCopier commandCopier = new CommandCopier(ctx, backupCommand);
return (WriteCommand) commandCopier.apply(target);
}
};
return super.handleReadWriteManyCommand(ctx, command, wrappedHelper);
}
Aggregations