Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Rdf\DedupeBag Interface Reference

Interface for a facility that avoids duplicates based on value hashes. More...

+ Inheritance diagram for Wikibase\Repo\Rdf\DedupeBag:

Public Member Functions

 alreadySeen ( $hash, $namespace='')
 Check whether alreadySeen() has been called with the same $hash and $namespace before on this DedupeBag instance.
 

Detailed Description

Interface for a facility that avoids duplicates based on value hashes.

Author
Daniel Kinzler

Member Function Documentation

◆ alreadySeen()

Wikibase\Repo\Rdf\DedupeBag::alreadySeen ( $hash,
$namespace = '' )

Check whether alreadySeen() has been called with the same $hash and $namespace before on this DedupeBag instance.

This can be used to avoid processing or generating data multiple times, based on a hash value that can be checked against the bag.

Note
False negatives are acceptable, while false positives are not. This means that implementations are free to return false if it is not sure whether the hash was seen before, but should never return true if it is not certain that the hash was seen before.
Parameters
string$hashHash to check
string$namespaceOptional namespace to allow a compartmentalized bag, tracking hashes from multiple value sets.
Returns
bool

Implemented in Wikibase\Repo\Rdf\HashDedupeBag, and Wikibase\Repo\Rdf\NullDedupeBag.


The documentation for this interface was generated from the following file: