overflowdb
package overflowdb
Type Members
- 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.
- class BatchedUpdate extends AnyRef
- class Config extends AnyRef
- trait DetachedNodeData extends Change with NodeOrDetachedNode
- class DetachedNodeGeneric extends DetachedNodeData
- sealed final class Direction extends Enum[Direction]
- abstract class Edge extends Element
- trait EdgeFactory[E <: Edge] extends AnyRef
- 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.
- abstract class Element extends AnyRef
- final class Graph extends AutoCloseable
- 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
- final class IndexManager extends AnyRef
- class Misc extends AnyRef
- abstract class Node extends Element with NodeOrDetachedNode
- 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 tonull
, 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. - abstract class NodeFactory[V <: NodeDb] extends AnyRef
- 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.
- trait NodeOrDetachedNode extends AnyRef
- 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 tonull
, 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 theNodeDb
- which is therefor strongly discouraged. Instead, the entire application should only ever hold ontoNodeRef
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 underlyingoverflowdb.storage.OdbStorage
. When OdbGraph is started from an existing storage location, onlyNodeRef
instances are created - the nodes are lazily on demand as described above. - class Property[A] extends AnyRef
- class PropertyKey[A] extends AnyRef
- 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.
- class SchemaViolationException extends RuntimeException