class DeferredObservableCounter implements ObservableCounterInterface

internal  
 

Keep a pre-fork observable counter and its creation callbacks replayable.

Properties

protected ObservableCounterInterface|null $delegate

Methods

__construct(DeferredMeter $meter, string $name, string|null $unit, string|null $description, array $advisory, array $callbacks)

Create a deferred observable counter.

void
bind(MeterInterface $meter)

Bind this handle to an instrument from the given meter.

void
unbind()

Unbind this handle from its worker instrument.

ObservableCallbackInterface
observe(callable $callback)

Register an observation callback that follows worker rebinding.

bool
belongsTo(DeferredMeter $meter)

Determine whether this instrument belongs to the given deferred meter.

ObservableCounterInterface|null
delegate()

Return the current worker instrument.

bool
isEnabled()

Determine whether the current observable counter is enabled.

Details

at line 26
__construct(DeferredMeter $meter, string $name, string|null $unit, string|null $description, array $advisory, array $callbacks)

Create a deferred observable counter.

Parameters

DeferredMeter $meter
string $name
string|null $unit
string|null $description
array $advisory
array $callbacks

at line 39
void bind(MeterInterface $meter)

Bind this handle to an instrument from the given meter.

Parameters

MeterInterface $meter

Return Value

void

at line 53
void unbind()

Unbind this handle from its worker instrument.

Return Value

void

at line 61
ObservableCallbackInterface observe(callable $callback)

Register an observation callback that follows worker rebinding.

Parameters

callable $callback

Return Value

ObservableCallbackInterface

at line 70
bool belongsTo(DeferredMeter $meter)

Determine whether this instrument belongs to the given deferred meter.

Parameters

DeferredMeter $meter

Return Value

bool

at line 78
ObservableCounterInterface|null delegate()

Return the current worker instrument.

Return Value

ObservableCounterInterface|null

at line 86
bool isEnabled()

Determine whether the current observable counter is enabled.

Return Value

bool