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

Store interface. More...

+ Inheritance diagram for Wikibase\Repo\Store\Store:

Public Member Functions

 newSiteLinkStore ()
 
 getEntityByLinkedTitleLookup ()
 
 clear ()
 Removes all data from the store.
 
 rebuild ()
 Rebuilds the store from the original data source.
 
 getTermIndex ()
 Use of this method indicates cases that should be migrated away from the expectation that all of this functionality is provided by a single class.
 
 getLegacyEntityTermStoreReader ()
 Use of this method represents cases that still need to be migrated away from using the legacy terms storage.
 
 getLegacyEntityTermStoreWriter ()
 This method will result in having 0 calls post migration as the service used to write to the term store changes in WikibaseRepo::getItemTermStoreWriter and WikibaseRepo::getPropertyTermStoreWriter.
 
 getLabelConflictFinder ()
 
 newItemsWithoutSitelinksFinder ()
 
 getEntityRedirectLookup ()
 
 getEntityLookup ( $cache=self::LOOKUP_CACHING_ENABLED, string $lookupMode=LookupConstants::LATEST_FROM_REPLICA)
 
 getEntityRevisionLookup ( $cache=self::LOOKUP_CACHING_ENABLED)
 
 getEntityStore ()
 
 getEntityStoreWatcher ()
 Returns an EntityStoreWatcher that should be notified of changes to entities, in order to keep any caches updated.
 
 getPropertyInfoLookup ()
 
 getPropertyInfoStore ()
 
 getSiteLinkConflictLookup ()
 
 getEntityPrefetcher ()
 Returns an EntityPrefetcher which can be used to prefetch a list of entity ids in case we need to for example load a batch of entity ids.
 
 getEntityChangeLookup ()
 
 getChangeStore ()
 

Public Attributes

const LOOKUP_CACHING_ENABLED = ''
 
const LOOKUP_CACHING_DISABLED = 'uncached'
 
const LOOKUP_CACHING_RETRIEVE_ONLY = 'retrieve-only'
 

Detailed Description

Store interface.

All interaction with store Wikibase does on top of storing pages and associated core MediaWiki indexing is done through this interface.

Todo:
provide getXXX() methods for getting local pseudo-singletons (shared service objects).
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

◆ clear()

Wikibase\Repo\Store\Store::clear ( )

Removes all data from the store.

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getChangeStore()

Wikibase\Repo\Store\Store::getChangeStore ( )
Returns
ChangeStore

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityByLinkedTitleLookup()

Wikibase\Repo\Store\Store::getEntityByLinkedTitleLookup ( )
Returns
EntityByLinkedTitleLookup

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityChangeLookup()

Wikibase\Repo\Store\Store::getEntityChangeLookup ( )
Returns
EntityChangeLookup

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityLookup()

Wikibase\Repo\Store\Store::getEntityLookup (   $cache = self::LOOKUP_CACHING_ENABLED,
string  $lookupMode = LookupConstants::LATEST_FROM_REPLICA 
)
Parameters
string$cacheOne of self::LOOKUP_CACHING_* self::LOOKUP_CACHING_DISABLED to get an uncached direct lookup self::LOOKUP_CACHING_RETRIEVE_ONLY to get a lookup which reads from the cache, but doesn't store retrieved entities self::LOOKUP_CACHING_ENABLED to get a caching lookup (default)
string$lookupModeOne of the EntityRevisionLookup lookup mode constants TODO this should perhaps not refer to EntityRevisionLookup
Returns
EntityLookup

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityPrefetcher()

Wikibase\Repo\Store\Store::getEntityPrefetcher ( )

Returns an EntityPrefetcher which can be used to prefetch a list of entity ids in case we need to for example load a batch of entity ids.

Returns
EntityPrefetcher

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityRedirectLookup()

Wikibase\Repo\Store\Store::getEntityRedirectLookup ( )
Returns
EntityRedirectLookup

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityRevisionLookup()

Wikibase\Repo\Store\Store::getEntityRevisionLookup (   $cache = self::LOOKUP_CACHING_ENABLED)
Parameters
string$cacheOne of self::LOOKUP_CACHING_* self::LOOKUP_CACHING_DISABLED to get an uncached direct lookup self::LOOKUP_CACHING_RETRIEVE_ONLY to get a lookup which reads from the cache, but doesn't store retrieved entities self::LOOKUP_CACHING_ENABLED to get a caching lookup (default)
Returns
EntityRevisionLookup

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityStore()

Wikibase\Repo\Store\Store::getEntityStore ( )
Returns
EntityStore

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getEntityStoreWatcher()

Wikibase\Repo\Store\Store::getEntityStoreWatcher ( )

Returns an EntityStoreWatcher that should be notified of changes to entities, in order to keep any caches updated.

Returns
EntityStoreWatcher

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getLabelConflictFinder()

Wikibase\Repo\Store\Store::getLabelConflictFinder ( )
Deprecated:
This will stop working once Wikibase migrates away from wb_terms An alternative will be available
Returns
LabelConflictFinder

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getLegacyEntityTermStoreReader()

Wikibase\Repo\Store\Store::getLegacyEntityTermStoreReader ( )

Use of this method represents cases that still need to be migrated away from using the legacy terms storage.

Deprecated:
This will stop working once Wikibase migrates away from wb_terms An exact alternative MAY NOT be available.
Returns
LegacyEntityTermStoreReader

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getLegacyEntityTermStoreWriter()

Wikibase\Repo\Store\Store::getLegacyEntityTermStoreWriter ( )

This method will result in having 0 calls post migration as the service used to write to the term store changes in WikibaseRepo::getItemTermStoreWriter and WikibaseRepo::getPropertyTermStoreWriter.

Deprecated:
This will stop working once Wikibase migrates away from wb_terms An alternative will be available
Returns
EntityTermStoreWriter

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getPropertyInfoLookup()

Wikibase\Repo\Store\Store::getPropertyInfoLookup ( )
Returns
PropertyInfoLookup

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getPropertyInfoStore()

Wikibase\Repo\Store\Store::getPropertyInfoStore ( )
Returns
PropertyInfoStore

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getSiteLinkConflictLookup()

Wikibase\Repo\Store\Store::getSiteLinkConflictLookup ( )
Returns
SiteLinkConflictLookup

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ getTermIndex()

Wikibase\Repo\Store\Store::getTermIndex ( )

Use of this method indicates cases that should be migrated away from the expectation that all of this functionality is provided by a single class.

Or that said thing needs to select one of the more specific services mentioned in the deprecated message.

@depreacted Use getLegacyEntityTermStoreReader, getLegacyEntityTermStoreWriter or getLabelConflictFinder directly.

Returns
TermIndex

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ newItemsWithoutSitelinksFinder()

Wikibase\Repo\Store\Store::newItemsWithoutSitelinksFinder ( )
Returns
ItemsWithoutSitelinksFinder

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ newSiteLinkStore()

Wikibase\Repo\Store\Store::newSiteLinkStore ( )
Returns
SiteLinkStore

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

◆ rebuild()

Wikibase\Repo\Store\Store::rebuild ( )

Rebuilds the store from the original data source.

Implemented in Wikibase\Repo\Store\Sql\SqlStore.

Member Data Documentation

◆ LOOKUP_CACHING_DISABLED

const Wikibase\Repo\Store\Store::LOOKUP_CACHING_DISABLED = 'uncached'

◆ LOOKUP_CACHING_ENABLED

const Wikibase\Repo\Store\Store::LOOKUP_CACHING_ENABLED = ''

◆ LOOKUP_CACHING_RETRIEVE_ONLY

const Wikibase\Repo\Store\Store::LOOKUP_CACHING_RETRIEVE_ONLY = 'retrieve-only'

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