telepath / com.github.giedomak.telepath.memorymanager / SimpleMemoryManager

SimpleMemoryManager

object SimpleMemoryManager : MemoryManager (source)

Let all results flow through this memory manager so we have control over the data and caching.

Functions

add

fun add(paths: Stream<Path>): Long

clear

fun clear(): Unit

Clear all stored data from the SimpleMemoryManager, temp files will be deleted on JVM exit.

fitsIntoMemory

fun fitsIntoMemory(partition: List<Path>): Boolean

Boolean value indicating if our new partition will fit into memory.

get

operator fun get(id: Long): Stream<Path>

set

operator fun set(id: Long, path: Path): Long
operator fun set(id: Long, paths: Stream<Path>): Long