private static XSiteStatePushCommand newStatePushCommand( Cache<?, ?> cache, List<XSiteState> stateList) { CommandsFactory commandsFactory = cache.getAdvancedCache().getComponentRegistry().getCommandsFactory(); return commandsFactory.buildXSiteStatePushCommand( stateList.toArray(new XSiteState[stateList.size()])); }