Package org.onosproject.net.topology
Class DefaultGraphDescription
- java.lang.Object
-
- org.onosproject.net.AbstractDescription
-
- org.onosproject.net.topology.DefaultGraphDescription
-
- All Implemented Interfaces:
Annotated
,Description
,GraphDescription
public class DefaultGraphDescription extends AbstractDescription implements GraphDescription
Default implementation of an immutable topology graph data carrier.
-
-
Constructor Summary
Constructors Constructor Description DefaultGraphDescription(long nanos, long millis, java.lang.Iterable<Device> devices, java.lang.Iterable<Link> links, SparseAnnotations... annotations)
Creates a minimal topology graph description to allow core to construct and process the topology graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
creationTime()
Returns the creation timestamp of the graph description.com.google.common.collect.ImmutableSet<TopologyEdge>
edges()
Returns the set of topology graph edges.long
timestamp()
Returns the creation timestamp of the graph description.com.google.common.collect.ImmutableSet<TopologyVertex>
vertexes()
Returns the set of topology graph vertexes.-
Methods inherited from class org.onosproject.net.AbstractDescription
annotations, equals, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.Description
annotations
-
-
-
-
Constructor Detail
-
DefaultGraphDescription
public DefaultGraphDescription(long nanos, long millis, java.lang.Iterable<Device> devices, java.lang.Iterable<Link> links, SparseAnnotations... annotations)
Creates a minimal topology graph description to allow core to construct and process the topology graph.- Parameters:
nanos
- time in nanos of when the topology description was createdmillis
- time in millis of when the topology description was createddevices
- collection of infrastructure deviceslinks
- collection of infrastructure linksannotations
- optional key/value annotations map
-
-
Method Detail
-
timestamp
public long timestamp()
Description copied from interface:GraphDescription
Returns the creation timestamp of the graph description. This is expressed in system nanos to allow proper sequencing.- Specified by:
timestamp
in interfaceGraphDescription
- Returns:
- graph description creation timestamp
-
creationTime
public long creationTime()
Description copied from interface:GraphDescription
Returns the creation timestamp of the graph description. This is expressed in system millis to allow proper date and time formatting.- Specified by:
creationTime
in interfaceGraphDescription
- Returns:
- graph description creation timestamp in millis
-
vertexes
public com.google.common.collect.ImmutableSet<TopologyVertex> vertexes()
Description copied from interface:GraphDescription
Returns the set of topology graph vertexes.- Specified by:
vertexes
in interfaceGraphDescription
- Returns:
- set of graph vertexes
-
edges
public com.google.common.collect.ImmutableSet<TopologyEdge> edges()
Description copied from interface:GraphDescription
Returns the set of topology graph edges.- Specified by:
edges
in interfaceGraphDescription
- Returns:
- set of graph edges
-
-