RotationPolicy
The resolved archive-rotation policy consumed by the rotation engine.
The internal, resolved counterpart of the [arango.dump.retention] config
(RetentionOption): max_age is already
turned into a cutoff instant and max_total into maxTotalBytes. Hydrated
from an $init array keyed by the class constants.
Tags
Table of Contents
Constants
- BUCKETS : string = 'buckets'
- The `buckets` property name — per-bucket `keep` overrides.
- CUTOFF : string = 'cutoff'
- The `cutoff` property name — the oldest instant kept by `max_age`.
- KEEP : string = 'keep'
- The `keep` property name — the number of recent archives kept per bucket.
- MAX_TOTAL_BYTES : string = 'maxTotalBytes'
- The `maxTotalBytes` property name — the global disk cap in bytes.
Properties
- $buckets : array<string|int, mixed>
- Per-bucket `keep` overrides, keyed by the bucket suffix signature.
- $cutoff : DateTimeImmutable|null
- The oldest instant to keep (archives older than this are eligible), or null.
- $keep : int|null
- The number of most recent archives to keep per bucket, or null.
- $maxTotalBytes : int|null
- The global disk cap in bytes, or null.
Methods
- __construct() : mixed
- Creates a new RotationPolicy.
Constants
BUCKETS
The `buckets` property name — per-bucket `keep` overrides.
public
string
BUCKETS
= 'buckets'
CUTOFF
The `cutoff` property name — the oldest instant kept by `max_age`.
public
string
CUTOFF
= 'cutoff'
KEEP
The `keep` property name — the number of recent archives kept per bucket.
public
string
KEEP
= 'keep'
MAX_TOTAL_BYTES
The `maxTotalBytes` property name — the global disk cap in bytes.
public
string
MAX_TOTAL_BYTES
= 'maxTotalBytes'
Properties
$buckets
Per-bucket `keep` overrides, keyed by the bucket suffix signature.
public
array<string|int, mixed>
$buckets
= []
$cutoff
The oldest instant to keep (archives older than this are eligible), or null.
public
DateTimeImmutable|null
$cutoff
= null
$keep
The number of most recent archives to keep per bucket, or null.
public
int|null
$keep
= null
$maxTotalBytes
The global disk cap in bytes, or null.
public
int|null
$maxTotalBytes
= null
Methods
__construct()
Creates a new RotationPolicy.
public
__construct([array<string|int, mixed>|object|null $init = null ]) : mixed
Parameters
- $init : array<string|int, mixed>|object|null = null
-
Initial values keyed by the class constants.