c

overflowdb

ReferenceManager

class ReferenceManager extends AutoCloseable with HeapNotificationListener

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.

Linear Supertypes
HeapNotificationListener, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReferenceManager
  2. HeapNotificationListener
  3. AutoCloseable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ReferenceManager(storage: OdbStorage, nodesWriter: NodesWriter, executorService: ExecutorService)

    Create a reference manager with the given storage and node writer set; the given executor will be used to spawn a background thread for clearing references.

    Create a reference manager with the given storage and node writer set; the given executor will be used to spawn a background thread for clearing references. Note that the executor will not be shut down once #close() is called, it's the callers responsibility to manage it.

  2. new ReferenceManager(storage: OdbStorage, nodesWriter: NodesWriter)

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 applyBackpressureMaybe(): Unit

    When we're running low on heap memory we'll serialize some elements to disk.

    When we're running low on heap memory we'll serialize some elements to disk. To ensure we're not creating new ones faster than old ones are serialized away, we're applying some backpressure to those newly created ones.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clearAllReferences(): Unit

    writes all references to disk overflow, blocks until complete.

    writes all references to disk overflow, blocks until complete. useful when saving the graph

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def close(): Unit
    Definition Classes
    ReferenceManager → AutoCloseable
    Annotations
    @Override()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def notifyHeapAboveThreshold(): Unit
    Definition Classes
    ReferenceManager → HeapNotificationListener
    Annotations
    @Override()
  19. def registerRef(ref: NodeRef): Unit
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from HeapNotificationListener

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped