Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e3e501
commit 32419e1
Showing
13 changed files
with
129 additions
and
5 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
symmetric-core/src/main/java/org/jumpmind/symmetric/model/Channel.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
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
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
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
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
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
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
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
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
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
37 changes: 37 additions & 0 deletions
37
symmetric-core/src/main/java/org/jumpmind/symmetric/statistic/NodeStatsByPeriodMap.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,37 @@ | ||
package org.jumpmind.symmetric.statistic; | ||
|
||
import java.util.Date; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class NodeStatsByPeriodMap extends AbstractStatsByPeriodMap<Map<String,ChannelStats>,ChannelStats> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public NodeStatsByPeriodMap(Date start, Date end, List<ChannelStats> list, | ||
int periodSizeInMinutes) { | ||
super(start, end, list, periodSizeInMinutes); | ||
} | ||
|
||
@Override | ||
protected void add(Date periodStart, ChannelStats stat) { | ||
Map<String, ChannelStats> map = get(periodStart); | ||
if (map == null) { | ||
map = new HashMap<String, ChannelStats>(); | ||
put(periodStart, map); | ||
} | ||
ChannelStats existing = map.get(stat.getNodeId()); | ||
if (existing == null) { | ||
map.put(stat.getNodeId(), stat); | ||
} else { | ||
existing.add(stat); | ||
} | ||
} | ||
|
||
@Override | ||
protected void addBlank(Date periodStart) { | ||
put(periodStart, new HashMap<String, ChannelStats>()); | ||
|
||
} | ||
} |