PartitionPolicy
com.worxbend.persistence.maintenance.PartitionPolicy
final case class PartitionPolicy(monthsAhead: Int, retainMonths: Option[Int], detachLockTimeout: FiniteDuration)
How far ahead to create partitions and how far back to keep them.
Value parameters
- detachLockTimeout
-
bound on how long a detach may wait for
ACCESS EXCLUSIVEon the parent. See PartitionDdl.detach for why waiting is the dangerous part. - monthsAhead
-
months beyond the current one that must have a partition.
3— ADR §5's figure — means four partitions exist at any time and the job may miss three consecutive monthly runs before an event has nowhere to go. - retainMonths
-
how many months, counting back from and including the current one, stay attached.
Nonedisables retention entirely, which is the default: detaching is the only operation here that makes data disappear from queries, so it happens when somebody configures it and not because a default said so.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article