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 EXCLUSIVE on 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. None disables 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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product