*
* @param platformSyncInfo sync info on the platform and references to the top level servers. not null.
*/
private void syncPlatform(PlatformSyncInfo platformSyncInfo) {
final Set<String> allServerSideUuids = new HashSet<String>();
ResourceSyncInfo platformResourceSyncInfo = platformSyncInfo.getPlatform();
// sync the platform because it does not get included in the top level server sync
allServerSideUuids.add(platformResourceSyncInfo.getUuid());
// sync the top level service hierarchy
addAllUuids(platformSyncInfo.getServices(), allServerSideUuids);
// Add the platform sync info to the service hierarchy in order to process in one batch
Collection<ResourceSyncInfo> syncInfos = platformSyncInfo.getServices();
syncInfos.add(platformResourceSyncInfo);
log.info("Sync Starting: Platform [" + platformSyncInfo.getPlatform().getId() + "]");
log.info("Sync Starting: Platform Top level services [" + platformSyncInfo.getPlatform().getId() + "]");
boolean hadSyncedResources = syncResources(platformResourceSyncInfo.getId(), syncInfos);
log.info("Sync Complete: Platform Top level services [" + platformSyncInfo.getPlatform().getId()
+ "] Local inventory changed: [" + hadSyncedResources + "]");
syncInfos = null; // release to GC