Page MenuHomePhorge
Diviner Tech Docs PhabricatorGarbageCollector

abstract class PhabricatorGarbageCollector
Phorge Technical Documentation (Daemons)

This class is not documented.

Tasks

Getting Collector Information

  • abstract public function getCollectorName() — Get a human readable name for what this collector cleans up, like "User Activity Logs".
  • public function hasAutomaticPolicy() — Specify that the collector has an automatic retention policy and is not configurable.
  • public function getDefaultRetentionPolicy() — Get the default retention policy for this collector.
  • public function getRetentionPolicy() — Get the effective retention policy.
  • final public function getCollectorConstant() — Get a unique string constant identifying this collector.

Collecting Garbage

  • final public function runCollector() — Run the collector.
  • abstract protected function collectGarbage() — Collect garbage from whatever source this GC handles.
  • final protected function getGarbageEpoch() — Get the most recent epoch timestamp that is considered garbage.
  • final public static function getAllCollectors() — Load all of the available garbage collectors.

Other Methods

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

abstract public function getCollectorName()

Get a human readable name for what this collector cleans up, like "User Activity Logs".

Return
stringHuman-readable collector name.

public function hasAutomaticPolicy()

Specify that the collector has an automatic retention policy and is not configurable.

Return
boolTrue if the collector has an automatic retention policy.

public function getDefaultRetentionPolicy()

Get the default retention policy for this collector.

Return the age (in seconds) when resources start getting collected, or null to retain resources indefinitely.

Return
int|nullLifetime, or `null` for indefinite retention.

public function getRetentionPolicy()

Get the effective retention policy.

Return
int|nullLifetime, or `null` for indefinite retention.

final public function getCollectorConstant()

Get a unique string constant identifying this collector.

Return
stringCollector constant.

final public function runCollector()

Run the collector.

Return
boolTrue if there is more garbage to collect.

abstract protected function collectGarbage()

Collect garbage from whatever source this GC handles.

Return
boolTrue if there is more garbage to collect.

final protected function getGarbageEpoch()

Get the most recent epoch timestamp that is considered garbage.

Records older than this should be collected.

Return
intMost recent garbage timestamp.

final public static function getAllCollectors()

Load all of the available garbage collectors.

Return
list<PhabricatorGarbageCollector>Garbage collectors.