ca.dvgi.periodic.jdk

Members list

Type members

Classlikes

class JdkAutoUpdatingVar[T](updateVar: => T, updateInterval: UpdateInterval[T], updateAttemptStrategy: UpdateAttemptStrategy, blockUntilReadyTimeout: Option[Duration], handleInitializationError: PartialFunction[Throwable, T], varNameOverride: Option[String], executorOverride: Option[ScheduledExecutorService])(implicit ct: ClassTag[T]) extends AutoUpdatingVar[Identity, Future, T]

An AutoUpdatingVar based on the JDK's ScheduledExecutorService.

An AutoUpdatingVar based on the JDK's ScheduledExecutorService.

By default, a JdkAutoUpdatingVar starts a new thread to handle its updates. If you are running many JdkAutoUpdatingVars, you may want to consider providing a shared ScheduledExecutorService to them.

Value parameters

blockUntilReadyTimeout

If specified, class instantiation will block the calling thread until it succeeds, fails, or the timeout is reached.

executorOverride

If present, will be used instead of starting a new thread.

handleInitializationError

A PartialFunction used to recover from exceptions in the var initialization. If unspecified, the exception will fail the effect returned by ready.

updateAttemptStrategy

Configuration for retrying updates on failure

updateInterval

Configuration for the update interval

updateVar

A thunk to initialize and update the var

varNameOverride

A name for this variable, used in logging. If unspecified, the simple class name of T will be used.

Attributes

Supertypes
class AutoUpdatingVar[Identity, Future, T]
trait AutoCloseable
class Object
trait Matchable
class Any

Types

type Identity[T] = T