+ logger.info( "Count for "+ key + ": " + mCnt);
+ totCnt += mCnt;
+ if (showDetail && mm!=null) {
+ brTopic[s] = new BrTopic();
+ brTopic[s].setBrSource( mm.getSourceCluster());
+ brTopic[s].setBrTarget(mm.getTargetCluster());
+ brTopic[s].setMmAgentName(mm.getMmName());
+ brTopic[s].setTopicCount(mm.getTopicCount());
+ s++;
+ }
+ }
+
+ logger.info( "topicCount [all locations]: " + totCnt );
+ brTopic[s] = new BrTopic();
+ brTopic[s].setBrSource("all");
+ brTopic[s].setBrTarget("all");
+ brTopic[s].setMmAgentName("n/a");
+ brTopic[s].setTopicCount(totCnt);
+ return brTopic;
+ }
+
+ @PUT
+ @ApiOperation( value = "update MirrorMaker details",
+ notes = "replace the topic list for a specific Bridge. Use JSON Body for value to replace whitelist, "
+ + "but if refreshFlag param is true, simply refresh using existing whitelist."
+ + "If split param is true, spread whitelist over smaller mmagents.",
+ response = MirrorMaker.class)
+ @ApiResponses( value = {
+ @ApiResponse( code = 200, message = "Success", response = BrTopic.class),
+ @ApiResponse( code = 400, message = "Error", response = ApiError.class )
+ })
+ public Response putBridgedTopics(@QueryParam("mmagent") String mmagent,
+ @QueryParam("refresh") Boolean refreshFlag,
+ @QueryParam("split") Boolean splitFlag,
+ MirrorMaker newBridge ){
+ logger.info( "putBridgeTopics() mmagent:" + mmagent );