package org.opendaylight.controller.cluster.datastore;
import static com.google.common.base.Verify.verify;
+import static java.util.Objects.requireNonNull;
-import com.google.common.base.Preconditions;
import com.google.common.collect.Collections2;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
import java.util.HashMap;
import java.util.Map;
private final String shardName;
FrontendMetadata(final String shardName) {
- this.shardName = Preconditions.checkNotNull(shardName);
+ this.shardName = requireNonNull(shardName);
}
@Override
verify(clients.replace(frontendId, client, new FrontendClientMetadataBuilder.Disabled(shardName, clientId)));
}
+
+ ImmutableSet<ClientIdentifier> getClients() {
+ return clients.values().stream()
+ .map(FrontendClientMetadataBuilder::getIdentifier)
+ .collect(ImmutableSet.toImmutableSet());
+ }
}