Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SMW\SQLStore\EntityStore\CachingSemanticDataLookup Class Reference

Public Member Functions

 __construct (SemanticDataLookup $semanticDataLookup, Cache $cache=null)
 
 lockCache ()
 
 unlockCache ()
 
 invalidateCache ( $id)
 
 initLookupCache ( $id, DIWikiPage $subject)
 
 setLookupCache ( $id, SemanticData $semanticData)
 
 getSemanticDataById ( $id)
 
 newRequestOptions (PropertyTableDefinition $propertyTableDef, DIProperty $property, RequestOptions $requestOptions=null)
 
 prefetchDataFromTable (array $subjects, DataItem $dataItem=null, PropertyTableDefinition $propertyTableDef, RequestOptions $requestOptions=null)
 
 fetchSemanticDataFromTable ( $id, DataItem $dataItem=null, PropertyTableDefinition $propertyTableDef, RequestOptions $requestOptions=null)
 
 getSemanticData ( $id, DataItem $dataItem=null, PropertyTableDefinition $propertyTableDef, RequestOptions $requestOptions=null)
 
 newStubSemanticData (DIWikiPage $subject)
 

Static Public Member Functions

static clear ()
 

Detailed Description

GNU GPL v2+

Since
3.0
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::__construct ( SemanticDataLookup  $semanticDataLookup,
Cache  $cache = null 
)
Since
3.0
Parameters
SemanticDataLookup$semanticDataLookup
Cache | null$cache

Member Function Documentation

◆ clear()

static SMW\SQLStore\EntityStore\CachingSemanticDataLookup::clear ( )
static
Since
3.0

◆ fetchSemanticDataFromTable()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::fetchSemanticDataFromTable (   $id,
DataItem  $dataItem = null,
PropertyTableDefinition  $propertyTableDef,
RequestOptions  $requestOptions = null 
)
Since
3.0
Parameters
integer$id
DataItem$dataItem
PropertyTableDefinition$propertyTableDef
RequestOptions$requestOptions
Returns
RequestOptions|null

◆ getSemanticData()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::getSemanticData (   $id,
DataItem  $dataItem = null,
PropertyTableDefinition  $propertyTableDef,
RequestOptions  $requestOptions = null 
)

Fetch and cache the data about one subject for one particular table

Parameters
integer$id
DIWikiPage$subject
PropertyTableDefinition$propertyTableDef
RequestOptions | null$requestOptions
Returns
SemanticData

◆ getSemanticDataById()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::getSemanticDataById (   $id)

Helper method to make sure there is a cache entry for the data about the given subject with the given ID.

Since
3.0
Parameters
int$id
DIWikiPage$subject

◆ initLookupCache()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::initLookupCache (   $id,
DIWikiPage  $subject 
)

Helper method to make sure there is a cache entry for the data about the given subject with the given ID.

Todo:
The management of this cache should be revisited.
Since
3.0
Parameters
int$id
DIWikiPage$subject

◆ invalidateCache()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::invalidateCache (   $id)
Since
3.0
Parameters
integer$id

◆ lockCache()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::lockCache ( )
Since
3.0

◆ newRequestOptions()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::newRequestOptions ( PropertyTableDefinition  $propertyTableDef,
DIProperty  $property,
RequestOptions  $requestOptions = null 
)
Since
3.0
Parameters
PropertyTableDefinition$propertyTableDef
DIProperty$property
RequestOptions | null$requestOptions
Returns
RequestOptions|null

◆ newStubSemanticData()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::newStubSemanticData ( DIWikiPage  $subject)
Since
3.0
Parameters
DIWikiPage$subject
Returns
StubSemanticData

◆ prefetchDataFromTable()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::prefetchDataFromTable ( array  $subjects,
DataItem  $dataItem = null,
PropertyTableDefinition  $propertyTableDef,
RequestOptions  $requestOptions = null 
)
Since
3.1
Parameters
array$subjects
DataItem$dataItem
PropertyTableDefinition$propertyTableDef
RequestOptions$requestOptions
Returns
[]

◆ setLookupCache()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::setLookupCache (   $id,
SemanticData  $semanticData 
)

Set the semantic data lookup cache to hold exactly the given value for the given ID.

Since
3.0
Parameters
integer$id
SemanticData$semanticData

◆ unlockCache()

SMW\SQLStore\EntityStore\CachingSemanticDataLookup::unlockCache ( )
Since
3.0

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

About | General disclaimer | Privacy policy