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.

Input

Parameter Comment
cmdbContext For details, see CmdbContext and the schema documentation for CmdbContext.
ChunkRequest The number of the chunk to retrieve and the ChunkInfo that is returned by the query method. For details, see ChunkRequest.
queryTypedProperties A collection of sets of properties to retrieve for items of a specific CI type.

Output

Parameter Comment
topologyMap For details, see TopologyMap and the schema documentation for TopologyMap.
comments For internal use only.

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             }         } }