Package org.rhq.core.domain.discovery

Examples of org.rhq.core.domain.discovery.ResourceSyncInfo


            default:
                break;
            }
        }

        ResourceSyncInfo platformSyncInfo = ResourceSyncInfo.buildResourceSyncInfo(platform);
        Set<ResourceSyncInfo> topLevelServiceSyncInfo = getToplevelServiceSyncInfo(toplevelServices);
        PlatformSyncInfo result = new PlatformSyncInfo(platformSyncInfo, topLevelServiceSyncInfo, topLevelServerIds);

        return result;
    }
View Full Code Here


            for (Object[] row : rows) {
                int id = dbType.getInteger(row[0]);
                String uuid = (String) row[1];
                long mtime = dbType.getLong(row[2]);
                InventoryStatus status = InventoryStatus.valueOf((String) row[3]);
                result.add(new ResourceSyncInfo(id, uuid, mtime, status));
            }
        } else {
            result = query.getResultList();
        }
View Full Code Here

     *
     * @param platforms the platforms in inventory
     * @param servers   the servers in inventory
     */
    public void updateAgentInventoryStatus(List<Resource> platforms, List<Resource> servers) {
        ResourceSyncInfo syncInfo;

        for (Resource platform : platforms) {
            AgentClient agentClient = agentManager.getAgentClient(platform.getAgent());
            if (agentClient != null) {
                try {
View Full Code Here

     *
     * @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

View Full Code Here

        return result;
    }

    private static void convertInternal(Resource root, Collection<ResourceSyncInfo> result) {

        ResourceSyncInfo rootSyncInfo = ResourceSyncInfo.buildResourceSyncInfo(root);

        if (result.contains(rootSyncInfo)) {
            return;
        }
        try {
View Full Code Here

        return result;
    }

    private static void convertInternal(Resource root, Collection<ResourceSyncInfo> result) {

        ResourceSyncInfo rootSyncInfo = ResourceSyncInfo.buildResourceSyncInfo(root);

        if (result.contains(rootSyncInfo)) {
            return;
        }
        try {
View Full Code Here

        return result;
    }

    private static void convertInternal(Resource root, Collection<ResourceSyncInfo> result) {

        ResourceSyncInfo rootSyncInfo = ResourceSyncInfo.buildResourceSyncInfo(root);

        if (result.contains(rootSyncInfo)) {
            return;
        }
        try {
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.discovery.ResourceSyncInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.