abstract class NodeDb extends Node

Holds node properties and edges to adjacent nodes (including edge properties). Each {NodeRef} refers to exactly one NodeDb instance, and if required can set that instance to null, thus freeing up memory, e.g. if heap memory is low. While {NodeRef} instances are very small (they will never be garbage collected), NodeDb instances consume a bit more space.

Adjacent nodes and edge properties are stored in a flat array (adjacentNodesWithEdgeProperties). Edges only exist virtually and are created on request. This allows for a small memory footprint, especially given that most graph domains have magnitudes more edges than nodes.

All write operations are synchronized using synchronized(this), in order to avoid race conditions when updating the adjacent nodes. Read operations are not locked, i.e. they are fast because they do not wait, but they may read outdated data.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NodeDb
  2. Node
  3. NodeOrDetachedNode
  4. Element
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new NodeDb(ref: NodeRef)
    Attributes
    protected[overflowdb]

Abstract Value Members

  1. abstract def layoutInformation(): NodeLayoutInformation
  2. abstract def property(key: String): AnyRef
    Definition Classes
    Element
  3. abstract def removeSpecificProperty(key: String): Unit
    Attributes
    protected[overflowdb]
  4. abstract def updateSpecificProperty(key: String, value: AnyRef): Unit
    Attributes
    protected[overflowdb]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def _initializeFromDetached(data: DetachedNodeData, mapper: Function[DetachedNodeData, Node]): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    Node
  5. def addEdgeImpl(label: String, inNode: Node, keyValues: Map[String, AnyRef]): Edge
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  6. def addEdgeImpl(label: String, inNode: Node, keyValues: <repeated...>[AnyRef]): Edge
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  7. def addEdgeSilentImpl(label: String, inNode: Node, keyValues: Map[String, AnyRef]): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  8. def addEdgeSilentImpl(label: String, inNode: Node, keyValues: <repeated...>[AnyRef]): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. final def blockLength(adjacentNodesTmp: AdjacentNodes, offsetPosition: Int): Int

    Returns the length of an edge type block in the adjacentNodesWithEdgeProperties array.

    Returns the length of an edge type block in the adjacentNodesWithEdgeProperties array. Length means number of index positions.

  11. final def blockOffsetToOccurrence(direction: Direction, label: String, otherNode: NodeRef, blockOffset: Int): Int

    If there are multiple edges between the same two nodes with the same label, we use the occurrence to differentiate between those edges.

    If there are multiple edges between the same two nodes with the same label, we use the occurrence to differentiate between those edges. Both nodes use the same occurrence index for the same edge.

    returns

    the occurrence for a given edge, calculated by counting the number times the given adjacent node occurred between the start of the edge-specific block and the blockOffset

    Attributes
    protected[overflowdb]
  12. def both(edgeLabels: <repeated...>[String]): Iterator[Node]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  13. def both(): Iterator[Node]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  14. def bothE(edgeLabels: <repeated...>[String]): Iterator[Edge]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  15. def bothE(): Iterator[Edge]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  17. final def createAdjacentNodeIteratorByOffSet[A <: Node](offsetPos: Int): Iterator[A]
  18. final def createAdjacentNodeScalaIteratorByOffSet[A <: Node](offsetPos: Int): Iterator[A]
  19. def edgeProperty[P](direction: Direction, edge: Edge, blockOffset: Int, key: String): P
  20. def edgePropertyMap(direction: Direction, edge: Edge, blockOffset: Int): Map[String, AnyRef]

    returns a Map of all explicitly set properties of an edge, i.e.

    returns a Map of all explicitly set properties of an edge, i.e. does not contain the properties which have the default value

  21. def edgePropertyOption[V](direction: Direction, edge: Edge, blockOffset: Int, key: String): Optional[V]
  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(obj: AnyRef): Boolean
    Definition Classes
    NodeDb → AnyRef → Any
    Annotations
    @Override()
  24. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  25. def getAdjacentNodes(): AdjacentNodes

    Gets the adjacent nodes with properties, in internal packed format.

    Gets the adjacent nodes with properties, in internal packed format. This function is really package-private, and only formally public to simplify internal organization of overflowdb.

  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def getEdgeProperties[V](direction: Direction, edge: Edge, blockOffset: Int, keys: <repeated...>[String]): Iterator[V]
  28. final def getStrideSize(edgeLabel: String): Int

    returns

    number of elements reserved in adjacentNodesWithEdgeProperties for a given edge label includes space for the node ref and all properties

  29. def graph(): Graph
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  30. def hashCode(): Int
    Definition Classes
    NodeDb → AnyRef → Any
    Annotations
    @Override()
  31. def id(): Long
    Definition Classes
    NodeDbNode
  32. def in(edgeLabels: <repeated...>[String]): Iterator[Node]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  33. def in(): Iterator[Node]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  34. def inE(edgeLabels: <repeated...>[String]): Iterator[Edge]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  35. def inE(): Iterator[Edge]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  36. final def instantiateDummyEdge(label: String, outNode: NodeRef, inNode: NodeRef): Edge

    instantiate and return a dummy edge, which doesn't really exist in the graph

  37. final def isDirty(): Boolean
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def label(): String
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  40. def markAsClean(): Unit
  41. def markAsDirty(): Unit
  42. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  44. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. final def occurrenceToBlockOffset(direction: Direction, label: String, adjacentNode: NodeRef, occurrence: Int): Int

    direction

    OUT or IN

    label

    the edge label

    occurrence

    if there are multiple edges between the same two nodes with the same label, this is used to differentiate between those edges. Both nodes use the same occurrence index in their adjacentNodesWithEdgeProperties array for the same edge.

    returns

    the index into adjacentNodesWithEdgeProperties

    Attributes
    protected[overflowdb]
  46. def out(edgeLabels: <repeated...>[String]): Iterator[Node]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  47. def out(): Iterator[Node]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  48. def outE(edgeLabels: <repeated...>[String]): Iterator[Edge]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  49. def outE(): Iterator[Edge]
    Definition Classes
    NodeDbNode
    Annotations
    @Override()
  50. def outEdgeCount(): Int
    Attributes
    protected[overflowdb]
  51. def propertiesMap(): Map[String, AnyRef]

    Map with all properties, including the default property values which haven't been explicitly set

    Map with all properties, including the default property values which haven't been explicitly set

    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  52. def propertiesMapForStorage(): Map[String, AnyRef]

    All properties *but* the default values, to ensure we don't serialize those.

    All properties *but* the default values, to ensure we don't serialize those. Providing a default implementation here, but the codegen overrides this for efficiency. Properties may have different runtime types here than what they have in properties(), e.g. if the domain classes use primitive arrays for efficiency.

  53. def property[A](key: PropertyKey[A]): A
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  54. def property[A](key: PropertyKey[A], defaultValue: A): A
    Definition Classes
    Element
  55. def property[A](key: String, defaultValue: A): A
    Definition Classes
    Element
  56. def propertyDefaultValue(propertyKey: String): AnyRef

    override this in specific element class, to define a default value

    override this in specific element class, to define a default value

    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  57. def propertyKeys(): Set[String]

    note: not differentiating null and default value is a bug - we won't fix it for now, but want to state that as a fact here...

    note: not differentiating null and default value is a bug - we won't fix it for now, but want to state that as a fact here...

    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  58. def propertyOption(key: String): Optional[AnyRef]
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  59. def propertyOption[A](key: PropertyKey[A]): Optional[A]
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  60. final def removeEdge(direction: Direction, label: String, blockOffset: Int): Unit

    Removes an 'edge', i.e.

    Removes an 'edge', i.e. in reality it removes the information about the adjacent node from adjacentNodesWithEdgeProperties. The corresponding elements will be set to null, i.e. we'll have holes. Note: this decrements the offset of the following edges in the same block by one, but that's ok because the only thing that matters is that the offset is identical for both connected nodes (assuming thread safety).

    blockOffset

    must have been initialized

    Attributes
    protected[overflowdb]
  61. def removeEdgeProperty(direction: Direction, edgeLabel: String, key: String, blockOffset: Int): Unit
  62. def removeImpl(): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  63. def removePropertyImpl(key: String): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  64. def setEdgeProperty[V](direction: Direction, edgeLabel: String, key: String, value: V, blockOffset: Int): Unit
  65. def setPropertyImpl(property: Property[_ <: AnyRef]): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  66. def setPropertyImpl[A](key: PropertyKey[A], value: A): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  67. def setPropertyImpl(key: String, value: AnyRef): Unit
    Attributes
    protected[overflowdb]
    Definition Classes
    NodeDbElement
    Annotations
    @Override()
  68. def startIndex(adjacentNodesTmp: AdjacentNodes, offsetPosition: Int): Int
  69. def storeAdjacentNode(direction: Direction, edgeLabel: String, adjacentNode: NodeRef, edgeKeyValues: <repeated...>[AnyRef]): Int
  70. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  71. def toString(): String
    Definition Classes
    AnyRef → Any
  72. def trim(): Long

    Trims the node to save storage: shrinks overallocations

  73. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  74. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  75. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. final def addEdge(label: String, inNode: Node, keyValues: Map[String, AnyRef]): Edge

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs.

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs.

    Definition Classes
    Node
    Annotations
    @Deprecated
    Deprecated
  2. final def addEdge(label: String, inNode: Node, keyValues: <repeated...>[AnyRef]): Edge

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs.

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs. These key/values must be provided in an even number where the odd numbered arguments are String property keys and the even numbered arguments are the related property values.

    Definition Classes
    Node
    Annotations
    @Deprecated
    Deprecated
  3. final def addEdgeSilent(label: String, inNode: Node, keyValues: Map[String, AnyRef]): Unit

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs.

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs. Just like

    addEdge2}}, but doesn't instantiate and return a dummy edge
    Definition Classes
    Node
    Annotations
    @Deprecated
    Deprecated
  4. final def addEdgeSilent(label: String, inNode: Node, keyValues: <repeated...>[AnyRef]): Unit

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs.

    Add an outgoing edge to the node with provided label and edge properties as key/value pairs. These key/values must be provided in an even number where the odd numbered arguments are String property keys and the even numbered arguments are the related property values. Just like

    addEdge2}}, but doesn't instantiate and return a dummy edge
    Definition Classes
    Node
    Annotations
    @Deprecated
    Deprecated
  5. final def remove(): Unit
    Definition Classes
    Element
    Annotations
    @Deprecated
    Deprecated
  6. final def removeProperty(key: String): Unit
    Definition Classes
    Element
    Annotations
    @Deprecated
    Deprecated
  7. final def setProperty(property: Property[_ <: AnyRef]): Unit
    Definition Classes
    Element
    Annotations
    @Deprecated
    Deprecated
  8. final def setProperty[A](key: PropertyKey[A], value: A): Unit
    Definition Classes
    Element
    Annotations
    @Deprecated
    Deprecated
  9. final def setProperty(key: String, value: AnyRef): Unit
    Definition Classes
    Element
    Annotations
    @Deprecated
    Deprecated

Inherited from Node

Inherited from NodeOrDetachedNode

Inherited from Element

Inherited from AnyRef

Inherited from Any

Ungrouped