suparnatural-cache / com.suparnatural.core.cache / CacheStoreBlockingWorker

CacheStoreBlockingWorker

class CacheStoreBlockingWorker : CacheStoreWorker

A CacheStoreWorker which blocks the calling thread.

Constructors

<init>

CacheStoreBlockingWorker()

A CacheStoreWorker which blocks the calling thread.

Functions

persistObject

fun <T : Cacheable> persistObject(input: <ERROR CLASS><T, <ERROR CLASS>, List<CacheStorePreprocessor<Cacheable, Cacheable, Cacheable>>?>, task: (<ERROR CLASS><T, <ERROR CLASS>, List<CacheStorePreprocessor<Cacheable, Cacheable, Cacheable>>?>) -> Unit): Unit

Adds an object by blocking the calling thread.

terminate

fun terminate(): <ERROR CLASS><Unit>

This method is a no-op. It simply returns a resolved future.

unlinkObject

fun unlinkObject(input: <ERROR CLASS>, task: (<ERROR CLASS>) -> Unit): Unit

Removes an object by blocking the calling thread.

Inherited Functions

persistObject

abstract fun <T : Cacheable> persistObject(input: <ERROR CLASS><T, <ERROR CLASS>, List<CacheStorePreprocessor<Cacheable, Cacheable, Cacheable>>?>, task: (<ERROR CLASS><T, <ERROR CLASS>, List<CacheStorePreprocessor<Cacheable, Cacheable, Cacheable>>?>) -> Unit): Unit

Invokes a strictly non-capturing lambda task with the input as an argument to persist T. The task must not access any state other than its arguments including any immutable of frozen objects to guarantee thread safety.

unlinkObject

abstract fun unlinkObject(input: <ERROR CLASS>, task: (<ERROR CLASS>) -> Unit): Unit

Invokes a strictly non-capturing lambda task with input to delete an object located at input. The task must not access any state other than its arguments including any immutable of frozen objects to guarantee thread safety.