ch.j3t.prefetcher
Type members
Classlikes
Concrete implementation for the PrefetchingSupplier trait. Should be used most of the time.
Concrete implementation for the PrefetchingSupplier trait. Should be used most of the time.
- Type parameters:
- T
the type of the pre-fetched value
- Value parameters:
- prefetchedValueRef
the Ref pointing to the currently held pre-fetched value
- updateFiber
the fiber running the regular update job
Implicit class for looking up elements in a pre-fetched map.
Implicit class for looking up elements in a pre-fetched map.
Allows returning a failed ZIO if the element cannot be found.
- Type parameters:
- K
key type
- V
value type
- Value parameters:
- m
the map on which to do the lookup
Conveys the fact that a lookup failed.
Conveys the fact that a lookup failed.
- Value parameters:
- cause
when failing to look up a set of keys, contains the error for the first key that was not found.
- message
details about the failed lookup
Implicit class for easing lookups in prefetchers that contain nested maps.
Implicit class for easing lookups in prefetchers that contain nested maps.
- Type parameters:
- K
outer key type
- N
nested key type
- V
value type
- Value parameters:
- a
the instance to do the lookup on
This class is akin to a Supplier[T] that will always have a T immediately available, while it is updated by a background job on a regular basis.
This class is akin to a Supplier[T] that will always have a T immediately available, while it is updated by a background job on a regular basis.
- Type parameters:
- T
the type of the pre-fetched value
- Companion:
- object
Static implementation of the prefetching supplier trait.
Static implementation of the prefetching supplier trait.
Mostly useful for tests.
- Type parameters:
- T
the type of the pre-fetched value
- Value parameters:
- get
the forever fixed value to be returned
Implicits
Implicits
Implicit class for looking up elements in a pre-fetched map.
Implicit class for looking up elements in a pre-fetched map.
Allows returning a failed ZIO if the element cannot be found.
- Type parameters:
- K
key type
- V
value type
- Value parameters:
- m
the map on which to do the lookup
Implicit class for easing lookups in prefetchers that contain nested maps.
Implicit class for easing lookups in prefetchers that contain nested maps.
- Type parameters:
- K
outer key type
- N
nested key type
- V
value type
- Value parameters:
- a
the instance to do the lookup on