telepath / com.github.giedomak.telepath.kpathindex / KPathIndexDisk

KPathIndexDisk

class KPathIndexDisk : KPathIndex (source)

Constructors

<init>

KPathIndexDisk(insertCallback: (Path) -> Unit = null, dir: File = Files.createTempDir())

Properties

insertCallback

var insertCallback: (Path) -> Unit

Callback which will be called after insertion of a path into the index.

k

var k: Int

K indicates the paths with up to this K number of edges are indexed in the kPathIndex. For example: if K=2, the index contains all paths which have 1 or 2 edges along the path.

Functions

getStatisticsStore

fun getStatisticsStore(): StatisticsStoreReader

Delegate the statisticsStore to PathDB.

insert

fun insert(path: Path, dryRun: Boolean): Unit

Insert method to insert a Path into the KPathIndex.

search

fun search(pathPrefix: PathPrefix): Stream<Path>

Search method to lookup paths in the KPathIndex.