com.atlassian.bitbucket.webhook.history.InvocationCounts |
Class Overview
Records a tally of successful, failed and error invocations for a webhook over some period of time.
The included period of time is from getWindowStart()
to the present moment and of
a fixed duration
Public Methods
public
int
getErrors
()
Returns
- the number of invocations that encountered an error before or during sending of a HTTP request for
a webhook invocation. Typically this is due to local network, system or other misadventure. Invocations counted
as errors are unlikely to have connected to the recipient.
public
int
getFailures
()
Returns
- the number of invocations in the period that respond over HTTP with a failure status code
public
int
getSuccesses
()
Returns
- the number of invocations in the period that respond over HTTP with a success status code
@Nonnull
public
Duration
getWindowDuration
()
Returns
- the duration of the window for the tallies
@Nonnull
public
Instant
getWindowStart
()
Returns
- the start of the window period (the end of the window is always Instant::now() now) give or
take a small relative gap between used to re-calculate the window's tallies