PollingMetric

zio.metrics.PollingMetric
See thePollingMetric companion object
trait PollingMetric[-R, +E, +Out]

A PollingMetric[Type, Out] is a combination of a metric and an effect that polls for updates to the metric.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
PollingMetric[R, E, Out]

Members list

Concise view

Type members

Types

type In
type Type

Value members

Abstract methods

def metric: Metric[Type, In, Out]

The metric that this PollingMetric polls to update.

The metric that this PollingMetric polls to update.

Attributes

def poll(implicit trace: Trace): ZIO[R, E, In]

An effect that polls a value that may be fed to the metric.

An effect that polls a value that may be fed to the metric.

Attributes

Concrete methods

final def blocking: Full[Type, In, R, E, Out]

Create a new PollingMetric that will poll on the blocking thread pool.

Create a new PollingMetric that will poll on the blocking thread pool.

Attributes

final def launch[R1 <: R, B](schedule: Schedule[R1, Any, B])(implicit trace: Trace): ZIO[R1 & Scope, Nothing, Fiber[E, B]]

Returns an effect that will launch the polling metric in a background fiber, using the specified schedule.

Returns an effect that will launch the polling metric in a background fiber, using the specified schedule.

Attributes

final def pollAndUpdate(implicit trace: Trace): ZIO[R, E, Unit]

An effect that polls for a value and uses the value to update the metric.

An effect that polls for a value and uses the value to update the metric.

Attributes

final def retry[R1 <: R, E1 >: E](policy: Schedule[R1, E1, Any]): Full[Type, In, R1, E1, Out]

Returns a new polling metric whose poll function will be retried with the specified retry policy.

Returns a new polling metric whose poll function will be retried with the specified retry policy.

Attributes

final def zip[R1 <: R, E1 >: E, Out2](that: PollingMetric[R1, E1, Out2])(implicit z1: Zippable[Type, Type], z2: Zippable[Out, Out2]): Full[Out, (In, In), R1, E1, Out]

Zips this polling metric with the specified polling metric.

Zips this polling metric with the specified polling metric.

Attributes