p

overflowdb

package overflowdb

Package Members

  1. package misc
  2. package storage
  3. package util

Type Members

  1. class AdjacentNodes extends AnyRef

    AdjacentNodes is the storage container for adjacent nodes, used in NodeDb.

    AdjacentNodes is the storage container for adjacent nodes, used in NodeDb.

    This class is really package private; it is only formally public to simplify internal organization of overflowdb.

  2. class BatchedUpdate extends AnyRef
  3. class Config extends AnyRef
  4. trait DetachedNodeData extends Change with NodeOrDetachedNode
  5. class DetachedNodeGeneric extends DetachedNodeData
  6. sealed final class Direction extends Enum[Direction]
  7. abstract class Edge extends Element
  8. trait EdgeFactory[E <: Edge] extends AnyRef
  9. class EdgeLayoutInformation extends AnyRef

    Edges only exist as a virtual concept in OverflowDbNode.

    Edges only exist as a virtual concept in OverflowDbNode. This is used to instantiate NodeLayoutInformation.

  10. abstract class Element extends AnyRef
  11. final class Graph extends AutoCloseable
  12. class HeapUsageMonitor extends AutoCloseable

    watches GC activity, and when we're low on available heap space, it instructs the ReferenceManager to clear some references, in order to avoid an OutOfMemoryError

  13. final class IndexManager extends AnyRef
  14. class Misc extends AnyRef
  15. abstract class Node extends Element with NodeOrDetachedNode
  16. abstract class NodeDb extends Node

    Holds node properties and edges to adjacent nodes (including edge properties).

    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.

  17. abstract class NodeFactory[V <: NodeDb] extends AnyRef
  18. class NodeLayoutInformation extends AnyRef

    Contains all static node-specific information for serialization / deserialization.

    Contains all static node-specific information for serialization / deserialization.

    Please make sure to instantiate only one instance per node type to not waste memory.

  19. trait NodeOrDetachedNode extends AnyRef
  20. abstract class NodeRef[N <: NodeDb] extends Node

    Lightweight (w.r.t.

    Lightweight (w.r.t. memory usage) reference to for an NodeDb, which is stored in the node member. When running low on memory (as detected by {HeapUsageMonitor}), the {ReferenceManager} may set that member to null, so that the garbage collector can free up some heap, thus avoiding @OutOfMemoryError. Note that this model only works if nothing else holds references to the NodeDb - which is therefor strongly discouraged. Instead, the entire application should only ever hold onto NodeRef instances.

    When the node member is currently null, but is then required (e.g. to lookup a property or an edge), the node will be fetched from the underlying overflowdb.storage.OdbStorage. When OdbGraph is started from an existing storage location, only NodeRef instances are created - the nodes are lazily on demand as described above.

  21. class Property[A] extends AnyRef
  22. class PropertyKey[A] extends AnyRef
  23. class ReferenceManager extends AutoCloseable with HeapNotificationListener

    can clear references to disk and apply backpressure when creating new nodes, both to avoid an OutOfMemoryError

    can clear references to disk and apply backpressure when creating new nodes, both to avoid an OutOfMemoryError

    can save all references to disk to persist the graph on shutdown n.b. we could also persist the graph without a ReferenceManager, by serializing all nodes to disk. But if that instance has been started from a storage location, the ReferenceManager ensures that we don't re-serialize all unchanged nodes.

  24. class SchemaViolationException extends RuntimeException

Ungrouped