abstract public function getCollectorName()
abstract public function getCollectorName()
Get a human readable name for what this collector cleans up, like "User Activity Logs".
Return
string | Human-readable collector name. |
public function hasAutomaticPolicy()
public function hasAutomaticPolicy()
Specify that the collector has an automatic retention policy and is not configurable.
Return
bool | True if the collector has an automatic retention policy. |
public function getDefaultRetentionPolicy()
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|null | Lifetime, or `null` for indefinite retention. |
public function getRetentionPolicy()
public function getRetentionPolicy()
Get the effective retention policy.
Return
int|null | Lifetime, or `null` for indefinite retention. |
final public function getCollectorConstant()
final public function getCollectorConstant()
Get a unique string constant identifying this collector.
Return
string | Collector constant. |
final public function runCollector()
final public function runCollector()
Run the collector.
Return
bool | True if there is more garbage to collect. |
abstract protected function collectGarbage()
abstract protected function collectGarbage()
Collect garbage from whatever source this GC handles.
Return
bool | True if there is more garbage to collect. |
final protected function getGarbageEpoch()
final protected function getGarbageEpoch()
Get the most recent epoch timestamp that is considered garbage.
Records older than this should be collected.
Return
int | Most recent garbage timestamp. |
final public static function getAllCollectors()
final public static function getAllCollectors()
Load all of the available garbage collectors.
Return
list<PhabricatorGarbageCollector> | Garbage collectors. |