AutoUpdater

ca.dvgi.periodic.AutoUpdater
trait AutoUpdater[U[_], R[_], T] extends AutoCloseable

AutoUpdatingVar delegates most functionality to an AutoUpdater, which may have many implementations.

Attributes

Graph
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
class JdkAutoUpdater[T]

Members list

Value members

Abstract methods

def latest: Option[T]

The latest in-memory value of the variable.

The latest in-memory value of the variable.

Attributes

Returns

Some[T] if the variable has been initialized successfully, otherwise None.

def start(log: Logger, updateVar: () => U[T], updateInterval: UpdateInterval[T], updateAttemptStrategy: UpdateAttemptStrategy, handleInitializationError: PartialFunction[Throwable, U[T]]): R[Unit]

Initializes the var for the first time, handling errors as specified. If successful, schedules the next update.

Initializes the var for the first time, handling errors as specified. If successful, schedules the next update.

Value parameters

log

Implementations should use this logger for consistency.

Attributes

Returns

An effect, which, if successfully completed, signifies that a value is available. If initialization failed, the effect should also be failed.

Inherited methods

def close(): Unit

Attributes

Inherited from:
AutoCloseable