Skip to content

Commit

Permalink
the probe ids are of interest too!
Browse files Browse the repository at this point in the history
  • Loading branch information
pschichtel committed Jul 11, 2021
1 parent 285e1a1 commit 660a074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
package org.spongepowered.observer.healthcheck;

import java.util.Collection;
import java.util.Map;

public interface HealthCheckCollection {
void registerProbe(String id, SyncHealthProbe probe);
Expand All @@ -33,5 +33,5 @@ public interface HealthCheckCollection {

void unregisterProbe(String id);

Collection<HealthProbe> probes();
Map<String, HealthProbe> probes();
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
package org.spongepowered.observer.healthcheck;

import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

Expand All @@ -48,7 +48,7 @@ public void unregisterProbe(String id) {
}

@Override
public Collection<HealthProbe> probes() {
return Collections.unmodifiableCollection(probes.values());
public Map<String, HealthProbe> probes() {
return Collections.unmodifiableMap(probes);
}
}

0 comments on commit 660a074

Please sign in to comment.