Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add method, that get scatter data made of dot group . #1518
added getFilteredServerMapDataMadeOfDotGroup method.
- Loading branch information
1 parent
bce3f0f
commit a9d84f7
Showing
16 changed files
with
408 additions
and
118 deletions.
There are no files selected for viewing
87 changes: 15 additions & 72 deletions
87
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,29 @@ | ||
/* | ||
* Copyright 2014 NAVER Corp. | ||
* Copyright 2016 NAVER Corp. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.navercorp.pinpoint.web.applicationmap; | ||
|
||
import java.util.*; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.navercorp.pinpoint.web.vo.*; | ||
import com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import java.util.Collection; | ||
|
||
/** | ||
* Node map | ||
* | ||
* @author netspider | ||
* @author emeroad | ||
* @Author Taejin Koo | ||
*/ | ||
public class ApplicationMap { | ||
|
||
private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
|
||
private final NodeList nodeList; | ||
private final LinkList linkList; | ||
|
||
private final Range range; | ||
|
||
private List<ApplicationScatterScanResult> applicationScatterScanResultList; | ||
|
||
|
||
ApplicationMap(Range range, NodeList nodeList, LinkList linkList) { | ||
if (range == null) { | ||
throw new NullPointerException("range must not be null"); | ||
} | ||
if (nodeList == null) { | ||
throw new NullPointerException("nodeList must not be null"); | ||
} | ||
if (linkList == null) { | ||
throw new NullPointerException("linkList must not be null"); | ||
} | ||
this.range = range; | ||
this.nodeList = nodeList; | ||
this.linkList = linkList; | ||
} | ||
|
||
@JsonProperty("nodeDataArray") | ||
public Collection<Node> getNodes() { | ||
return this.nodeList.getNodeList(); | ||
} | ||
|
||
@JsonProperty("linkDataArray") | ||
public Collection<Link> getLinks() { | ||
return this.linkList.getLinkList(); | ||
} | ||
|
||
|
||
public void setApplicationScatterScanResult(List<ApplicationScatterScanResult> applicationScatterScanResultList) { | ||
this.applicationScatterScanResultList = applicationScatterScanResultList; | ||
} | ||
|
||
@JsonIgnore | ||
public List<ApplicationScatterScanResult> getApplicationScatterScanResultList() { | ||
return applicationScatterScanResultList; | ||
} | ||
|
||
|
||
public interface ApplicationMap { | ||
|
||
Collection<Node> getNodes(); | ||
|
||
Collection<Link> getLinks(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...rc/main/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMapWithScatterData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2016 NAVER Corp. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.navercorp.pinpoint.web.applicationmap; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.navercorp.pinpoint.web.scatter.ScatterData; | ||
import com.navercorp.pinpoint.web.vo.Application; | ||
|
||
import java.util.Collection; | ||
import java.util.Map; | ||
|
||
/** | ||
* @Author Taejin Koo | ||
*/ | ||
public class ApplicationMapWithScatterData implements ApplicationMap { | ||
|
||
private final ApplicationMap applicationMap; | ||
private final Map<Application, ScatterData> applicationScatterDataMap; | ||
|
||
public ApplicationMapWithScatterData(ApplicationMap applicationMap, Map<Application, ScatterData> applicationScatterDataMap) { | ||
this.applicationMap = applicationMap; | ||
this.applicationScatterDataMap = applicationScatterDataMap; | ||
} | ||
|
||
@Override | ||
public Collection<Node> getNodes() { | ||
return applicationMap.getNodes(); | ||
} | ||
|
||
@Override | ||
public Collection<Link> getLinks() { | ||
return applicationMap.getLinks(); | ||
} | ||
|
||
@JsonIgnore | ||
public Map<Application, ScatterData> getApplicationScatterDataMap() { | ||
return applicationScatterDataMap; | ||
} | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
...n/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMapWithScatterScanResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2016 NAVER Corp. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.navercorp.pinpoint.web.applicationmap; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
/** | ||
* @Author Taejin Koo | ||
*/ | ||
public class ApplicationMapWithScatterScanResult implements ApplicationMap { | ||
|
||
private final ApplicationMap applicationMap; | ||
private final List<ApplicationScatterScanResult> applicationScatterScanResultList; | ||
|
||
public ApplicationMapWithScatterScanResult(ApplicationMap applicationMap, List<ApplicationScatterScanResult> applicationScatterScanResultList) { | ||
this.applicationMap = applicationMap; | ||
this.applicationScatterScanResultList = applicationScatterScanResultList; | ||
} | ||
|
||
@Override | ||
public Collection<Node> getNodes() { | ||
return applicationMap.getNodes(); | ||
} | ||
|
||
@Override | ||
public Collection<Link> getLinks() { | ||
return applicationMap.getLinks(); | ||
} | ||
|
||
@JsonIgnore | ||
public List<ApplicationScatterScanResult> getApplicationScatterScanResultList() { | ||
return applicationScatterScanResultList; | ||
} | ||
|
||
} |
66 changes: 66 additions & 0 deletions
66
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/DefaultApplicationMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright 2014 NAVER Corp. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.navercorp.pinpoint.web.applicationmap; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.navercorp.pinpoint.web.vo.Range; | ||
import com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
/** | ||
* Node map | ||
* | ||
* @author netspider | ||
* @author emeroad | ||
*/ | ||
public class DefaultApplicationMap implements ApplicationMap { | ||
|
||
private final NodeList nodeList; | ||
private final LinkList linkList; | ||
|
||
private final Range range; | ||
|
||
private List<ApplicationScatterScanResult> applicationScatterScanResultList; | ||
|
||
DefaultApplicationMap(Range range, NodeList nodeList, LinkList linkList) { | ||
if (range == null) { | ||
throw new NullPointerException("range must not be null"); | ||
} | ||
if (nodeList == null) { | ||
throw new NullPointerException("nodeList must not be null"); | ||
} | ||
if (linkList == null) { | ||
throw new NullPointerException("linkList must not be null"); | ||
} | ||
this.range = range; | ||
this.nodeList = nodeList; | ||
this.linkList = linkList; | ||
} | ||
|
||
@JsonProperty("nodeDataArray") | ||
public Collection<Node> getNodes() { | ||
return this.nodeList.getNodeList(); | ||
} | ||
|
||
@JsonProperty("linkDataArray") | ||
public Collection<Link> getLinks() { | ||
return this.linkList.getLinkList(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.