@Service
public class DistributedClusterStore
extends org.onosproject.store.AbstractStore<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterStoreDelegate>
implements org.onosproject.cluster.ClusterStore
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cfg.ComponentConfigService |
cfgService |
protected org.onosproject.cluster.ClusterMetadataService |
clusterMetadataService |
static java.lang.String |
HEARTBEAT_MESSAGE |
protected org.onosproject.store.cluster.messaging.MessagingService |
messagingService |
protected org.onosproject.core.VersionService |
versionService |
| Constructor and Description |
|---|
DistributedClusterStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
org.onosproject.cluster.ControllerNode |
addNode(org.onosproject.cluster.NodeId nodeId,
org.onlab.packet.IpAddress ip,
int tcpPort) |
protected void |
bindComponentConfigService(org.onosproject.cfg.ComponentConfigService service)
Hook for wiring up optional reference to a service.
|
void |
deactivate() |
java.time.Instant |
getLastUpdatedInstant(org.onosproject.cluster.NodeId nodeId) |
org.onosproject.cluster.ControllerNode |
getLocalNode() |
org.onosproject.cluster.ControllerNode |
getNode(org.onosproject.cluster.NodeId nodeId) |
java.util.Set<org.onosproject.cluster.ControllerNode> |
getNodes() |
org.onosproject.cluster.ControllerNode.State |
getState(org.onosproject.cluster.NodeId nodeId) |
org.onosproject.core.Version |
getVersion(org.onosproject.cluster.NodeId nodeId) |
boolean |
hasDelegate() |
void |
markFullyStarted(boolean started) |
void |
modified(org.osgi.service.component.ComponentContext context) |
void |
removeNode(org.onosproject.cluster.NodeId nodeId) |
void |
setDelegate(org.onosproject.cluster.ClusterStoreDelegate delegate) |
protected void |
unbindComponentConfigService(org.onosproject.cfg.ComponentConfigService service)
Hook for unwiring optional reference to a service.
|
void |
unsetDelegate(org.onosproject.cluster.ClusterStoreDelegate delegate) |
public static final java.lang.String HEARTBEAT_MESSAGE
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.VersionService versionService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterMetadataService clusterMetadataService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.cluster.messaging.MessagingService messagingService
@Reference(cardinality=OPTIONAL_UNARY,
bind="bindComponentConfigService",
unbind="unbindComponentConfigService",
policy=DYNAMIC)
protected org.onosproject.cfg.ComponentConfigService cfgService
protected void bindComponentConfigService(org.onosproject.cfg.ComponentConfigService service)
service - service being announcedprotected void unbindComponentConfigService(org.onosproject.cfg.ComponentConfigService service)
service - service being withdrawn@Activate public void activate()
@Deactivate public void deactivate()
@Modified public void modified(org.osgi.service.component.ComponentContext context)
public void setDelegate(org.onosproject.cluster.ClusterStoreDelegate delegate)
setDelegate in interface org.onosproject.store.Store<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterStoreDelegate>setDelegate in class org.onosproject.store.AbstractStore<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterStoreDelegate>public void unsetDelegate(org.onosproject.cluster.ClusterStoreDelegate delegate)
unsetDelegate in interface org.onosproject.store.Store<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterStoreDelegate>unsetDelegate in class org.onosproject.store.AbstractStore<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterStoreDelegate>public boolean hasDelegate()
hasDelegate in interface org.onosproject.store.Store<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterStoreDelegate>hasDelegate in class org.onosproject.store.AbstractStore<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterStoreDelegate>public org.onosproject.cluster.ControllerNode getLocalNode()
getLocalNode in interface org.onosproject.cluster.ClusterStorepublic java.util.Set<org.onosproject.cluster.ControllerNode> getNodes()
getNodes in interface org.onosproject.cluster.ClusterStorepublic org.onosproject.cluster.ControllerNode getNode(org.onosproject.cluster.NodeId nodeId)
getNode in interface org.onosproject.cluster.ClusterStorepublic org.onosproject.cluster.ControllerNode.State getState(org.onosproject.cluster.NodeId nodeId)
getState in interface org.onosproject.cluster.ClusterStorepublic org.onosproject.core.Version getVersion(org.onosproject.cluster.NodeId nodeId)
getVersion in interface org.onosproject.cluster.ClusterStorepublic void markFullyStarted(boolean started)
markFullyStarted in interface org.onosproject.cluster.ClusterStorepublic org.onosproject.cluster.ControllerNode addNode(org.onosproject.cluster.NodeId nodeId,
org.onlab.packet.IpAddress ip,
int tcpPort)
addNode in interface org.onosproject.cluster.ClusterStorepublic void removeNode(org.onosproject.cluster.NodeId nodeId)
removeNode in interface org.onosproject.cluster.ClusterStorepublic java.time.Instant getLastUpdatedInstant(org.onosproject.cluster.NodeId nodeId)
getLastUpdatedInstant in interface org.onosproject.cluster.ClusterStore