pullTopologyMapChunks

The pullTopologyMapChunks method retrieves one of the chunks that contain the response to a method.

Each chunk contains a topologyMap element that is part of the response. The first chunk is numbered 1, so the retrieval loop counter iterates from 1 to <response object>.getChunkInfo().getNumberOfChunks().

For details, see ChunkInfo and Query the CMDB.

The client application must be able to handle the partial maps. See the following example of handling a CI collection and the example of merging chunks to a map in Query Example.

Example of Handling Chunks:

GetCIsByType request = 
     new GetCIsByType(cmdbContext, typeName, customProperties); GetCIsByTypeResponse response =
     ucmdbService.getCIsByType(request); ChunkRequest chunkRequest = new ChunkRequest(); chunkRequest.setChunkInfo(response.getChunkInfo()); for(int j=1; j<=response.getChunkInfo().getNumberOfChunks(); j++){     chunkRequest.setChunkNumber(j);     PullTopologyMapChunks req =new PullTopologyMapChunks(cmdbContext,chunkRequest);     PullTopologyMapChunksResponse res =
        ucmdbService.pullTopologyMapChunks(req);         for(int m=0 ;
            m < res.getTopologyMap().getCINodes().sizeCINodeList();
            m++) {             CIs cis =
            res.getTopologyMap().getCINodes().getCINode(m).getCIs();             for(int i=0 ; i < cis.sizeCIList() ; i++) {                 // your code to process the CIs             }         } }
GetCIsByType request = 
     new GetCIsByType(cmdbContext, typeName, customProperties); GetCIsByTypeResponse response =
     ucmdbService.getCIsByType(request); ChunkRequest chunkRequest = new ChunkRequest(); chunkRequest.setChunkInfo(response.getChunkInfo()); for(int j=1 ; j <= response.getChunkInfo().getNumberOfChunks() ; j++) {     chunkRequest.setChunkNumber(j);     PullTopologyMapChunks req = new PullTopologyMapChunks(cmdbContext, chunkRequest);     PullTopologyMapChunksResponse res =
        ucmdbService.pullTopologyMapChunks(req);         for(int m=0 ;
            m < res.getTopologyMap().getCINodes().getCINodes().size();
            m++) {             CIs cis =
            res.getTopologyMap().getCINodes().getCINodes().get(m).getCIs();             for(int i=0 ; i < cis.getCIs().size(); i++) {                 // your code to process the CIs             }         } }