HIGUCHI Yuta
Committed by Gerrit Code Review

Cosmetic fixes for DefaultClusterMetadataProvider

Change-Id: I3d4d49fb38ec258f5a9a7c6007a40255d6465801
......@@ -46,7 +46,6 @@ import org.onosproject.store.service.Versioned;
import org.slf4j.Logger;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
/**
* Provider of default {@link ClusterMetadata cluster metadata}.
......@@ -65,7 +64,7 @@ public class DefaultClusterMetadataProvider implements ClusterMetadataProvider {
private static final String DEFAULT_ONOS_INTERFACE = "eth0";
private static final int DEFAULT_ONOS_PORT = 9876;
private static final ProviderId PROVIDER_ID = new ProviderId("default", "none");
private AtomicReference<Versioned<ClusterMetadata>> cachedMetadata = new AtomicReference<>();
private final AtomicReference<Versioned<ClusterMetadata>> cachedMetadata = new AtomicReference<>();
@Activate
public void activate() {
......@@ -73,9 +72,9 @@ public class DefaultClusterMetadataProvider implements ClusterMetadataProvider {
ControllerNode localNode =
new DefaultControllerNode(new NodeId(localIp), IpAddress.valueOf(localIp), DEFAULT_ONOS_PORT);
// p0 partition
Partition basePartition = new DefaultPartition(PartitionId.from(0), Sets.newHashSet(localNode.id()));
Partition basePartition = new DefaultPartition(PartitionId.from(0), ImmutableSet.of(localNode.id()));
// p1 partition
Partition extendedPartition = new DefaultPartition(PartitionId.from(1), Sets.newHashSet(localNode.id()));
Partition extendedPartition = new DefaultPartition(PartitionId.from(1), ImmutableSet.of(localNode.id()));
ClusterMetadata metadata = new ClusterMetadata(PROVIDER_ID,
"default",
ImmutableSet.of(localNode),
......