DefaultInMemoryReplResultsHolder

Default implementation that just stores in-memory values in a HashMap This also mean that they are live for the life-time of the jupyter session or until a new REPL result is calculated for the same id, after which the old result is GC'ed.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val size: Int

Returns how many REPL results are currently being stored.

Functions

Link copied to clipboard
open override fun addReplResult(result: Any?): String

Add a REPL result without an ID. An ID will be auto-generated and returned.

Link copied to clipboard
open override fun getReplResult(id: String): Any?

Returns the REPL result for a given id or null if no result exists or null was the result.

Link copied to clipboard
open override fun removeReplResult(id: String): Boolean

Removes the REPL result with the given id from the holder. Returns true if an entry was removed, false if not.

Link copied to clipboard
open override fun setReplResult(id: String, result: Any?)

Sets the REPL result for a given id.