Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
635d2388
Commit
635d2388
authored
Feb 21, 2020
by
Julian Zobel
Browse files
Added a groupID-filtered host request to the Global Orcale
parent
faddbb04
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/util/oracle/GlobalOracle.java
View file @
635d2388
...
...
@@ -173,6 +173,29 @@ public class GlobalOracle implements OracleComponent {
}
}
/**
* @return the list with all hosts of the scenario
*/
public
static
List
<
SimHost
>
getHosts
(
String
groupID
)
{
if
(
groupID
.
equals
(
""
))
{
return
getHosts
();
}
else
{
synchronized
(
hosts
)
{
ArrayList
<
SimHost
>
groupedHosts
=
new
ArrayList
<
SimHost
>();
for
(
SimHost
h
:
hosts
)
{
if
(
h
.
getProperties
().
getGroupID
().
equals
(
groupID
))
{
groupedHosts
.
add
(
h
);
}
}
return
groupedHosts
;
}
}
}
@Override
public
List
<
Host
>
getAllHosts
()
{
return
new
ArrayList
<
Host
>(
hosts
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment