DurableCacheMapImpl

trait DurableCacheMapImpl[T <: Txn[T], K] extends Durable[T, K, DurablePersistentMap[T, K]] with CacheMapImpl[T, K, DurablePersistentMap[T, K]]
Companion
object
trait Durable[T, K, DurablePersistentMap[T, K]]
trait CacheMap[T, K, DurablePersistentMap[T, K]]
trait Cache[T]
class Object
trait Matchable
class Any

Value members

Concrete methods

final override
def getCacheNonTxn[A](key: K, tx: T)(implicit path: Access[T], format: ConstFormat[A]): Option[A]

Retrieves a value from the cache or the underlying store (if not found in the cache), where a non-transactional format exists.

Retrieves a value from the cache or the underlying store (if not found in the cache), where a non-transactional format exists.

If no value is found for the current path, this will try to read the most recent entry along the path.

Type Params
A

the type of value stored

Value Params
format

the format to use for the value

key

key at which the entry is stored

path

access path for the read

tx

the current transaction

Returns

the most recent value found, or None if a value cannot be found for the given path, neither in the cache nor in the persistent store.

Definition Classes
final override
def getCacheTxn[A](key: K, tx: T)(implicit path: Access[T], format: TFormat[T, A]): Option[A]

Retrieves a value from the cache or the underlying store (if not found in the cache), where 'only' a transactional format exists.

Retrieves a value from the cache or the underlying store (if not found in the cache), where 'only' a transactional format exists.

If no value is found for the current path, this will try to read the most recent entry along the path.

Type Params
A

the type of value stored

Value Params
format

the format to use for the value

key

key at which the entry is stored

path

access path for the read

tx

the current transaction

Returns

the most recent value found, or None if a value cannot be found for the given path, neither in the cache nor in the persistent store.

Definition Classes
final override
def putCacheNonTxn[A](key: K, value: A, tx: T)(implicit path: Access[T], format: ConstFormat[A]): Unit

Stores an entry in the cache for which a non-transactional format exists.

Stores an entry in the cache for which a non-transactional format exists.

Note that the caller is responsible for monitoring this call, and if necessary installing a before-commit handler which will call into the abstract method flushCache().

Type Params
A

the type of value stored

Value Params
format

the format to use for the value

key

key at which the entry will be stored

path

write path when persisting

tx

the current transaction

value

value to be stored (entry)

Definition Classes
final override
def putCacheTxn[A](key: K, value: A, tx: T)(implicit path: Access[T], format: TFormat[T, A]): Unit

Stores an entry in the cache for which 'only' a transactional format exists.

Stores an entry in the cache for which 'only' a transactional format exists.

Note that the caller is responsible for monitoring this call, and if necessary installing a before-commit handler which will call into the abstract method flushCache().

Type Params
A

the type of value stored

Value Params
format

the format to use for the value

key

key at which the entry will be stored

path

write path when persisting

tx

the current transaction

value

value to be stored (entry)

Definition Classes
final override
def removeCache(key: K, tx: T)(implicit path: Access[LazyRef(...)]): Boolean
Definition Classes

Inherited methods

final override
def cacheContains(key: K, tx: T)(implicit path: Access[LazyRef(...)]): Boolean
Definition Classes
Inherited from
CacheMapImpl
final override
def flushCache(term: Long)(implicit tx: T): Unit

This method should be invoked from the implementations flush hook after it has determined the terminal version at which the entries in the cache are written to the persistent store. If this method is not called, the cache will just vanish and not be written out to the persistent store.

This method should be invoked from the implementations flush hook after it has determined the terminal version at which the entries in the cache are written to the persistent store. If this method is not called, the cache will just vanish and not be written out to the persistent store.

Value Params
term

the new version to append to the paths in the cache (using the PathLike's addTerm method)

tx

the current transaction (should be in commit or right-before commit phase)

Definition Classes
Inherited from
CacheMapImpl
final override
def getCacheOnly[A](key: K, tx: T)(implicit path: Access[T]): Option[A]
Definition Classes
Inherited from
CacheMapImpl
final override
def removeCacheOnly(key: K, tx: T)(implicit path: Access[LazyRef(...)]): Boolean

Removes an entry from the cache, and only the cache. This will not affect any values also persisted to persistent! If the cache does not contain an entry at the given key, this method simply returns.

Removes an entry from the cache, and only the cache. This will not affect any values also persisted to persistent! If the cache does not contain an entry at the given key, this method simply returns.

Value Params
key

key at which the entry is stored

tx

the current transaction

Definition Classes
Inherited from
CacheMapImpl

The persistent map to which the data is flushed or from which it is retrieved when not residing in cache.

The persistent map to which the data is flushed or from which it is retrieved when not residing in cache.

Inherited from
CacheMap