Retry


Object Hierarchy:

Object hierarchy for Retry

Description:

public class Retry : Object

Retry policy for resilient operations such as HTTP calls or lock acquisition.

This class encapsulates: - maximum attempts - delay strategy (fixed or exponential backoff) - optional jitter - retry predicate and callback hooks

Example:

    Retry retry = Retry.networkDefault ();
var configured = retry.withMaxAttempts (3);
if (configured.isError ()) {
return;
}
retry.onRetry ((attempt, reason, delay) => {
print ("retry %d: %s (%" + int64.FORMAT + "ms)\n", attempt, reason, delay);
});

bool ok = retry.retry (() => {
return call_external_service ();
});


Namespace: Vala.Net
Package: Valacore

Content:

Static methods:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class GLib.Object