Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SMW\MediaWiki\Jobs\ChangePropagationDispatchJob Class Reference
Inheritance diagram for SMW\MediaWiki\Jobs\ChangePropagationDispatchJob:
Inheritance graph
[legend]
Collaboration diagram for SMW\MediaWiki\Jobs\ChangePropagationDispatchJob:
Collaboration graph
[legend]

Public Member Functions

 __construct (Title $title, $params=[])
 
 run ()
 
- Public Member Functions inherited from SMW\MediaWiki\Job
 setStore (Store $store)
 
 isEnabledJobQueue ( $enableJobQueue=true)
 
 pushToJobQueue ()
 
 getType ()
 
 getJobCount ()
 
 hasParameter ( $key)
 
 getParameter ( $key, $default=false)
 
 setParameter ( $key, $value)
 
 insert ()
 
 lazyPush ()
 
 setDelay ( $delay)
 
 ignoreDuplicates ()
 
 waitOnCommandLineMode ()
 

Static Public Member Functions

static planAsJob (DIWikiPage $subject, $params=[])
 
static cleanUp (DIWikiPage $subject)
 
static hasPendingJobs (DIWikiPage $subject)
 
static getPendingJobsCount (DIWikiPage $subject)
 
- Static Public Member Functions inherited from SMW\MediaWiki\Job
static batchInsert ( $jobs)
 
static newRootJobParams ( $key='', $title='')
 

Public Attributes

const CHUNK_SIZE = 1000
 
const CACHE_NAMESPACE = 'smw:chgprop'
 

Additional Inherited Members

- Protected Member Functions inherited from SMW\MediaWiki\Job
 getJobQueue ()
 
- Protected Attributes inherited from SMW\MediaWiki\Job
 $isEnabledJobQueue = true
 
 $jobQueue
 
 $jobs = []
 
 $store = null
 

Detailed Description

ChangePropagationDispatchJob dispatches update jobs via ChangePropagationUpdateJob to allow isolating the execution and count pending jobs without using an extra tracking mechanism during an update process.

ChangePropagationUpdateJob (and hereby ChangePropagationClassUpdateJob) itself relies on the UpdateJob to initiate the update.

ChangePropagationDispatchJob is responsible for:

Due to the possibility that a large list of entities can be connected to a property and its change, an iterative or recursive processing is not viable (as the changed specification should be available as soon as possible) therefore the selection process will move the result of entities to chunked temp files to avoid having to use a DB connection during the process (has been observed during tests that would lead to an out-of-memory) to store a list of entities that require an update.

GNU GPL v2+

Since
3.0
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::__construct ( Title  $title,
  $params = [] 
)
Since
3.0
Parameters
Title$title
array$params

Member Function Documentation

◆ cleanUp()

static SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::cleanUp ( DIWikiPage  $subject)
static
Since
3.0
Parameters
DIWikiPage$subject

◆ getPendingJobsCount()

static SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::getPendingJobsCount ( DIWikiPage  $subject)
static

Use as very simple heuristic to count pending jobs for the overall change propagation. The count will indicate any job related to the change propagation and does not distinguish by changes to a specific property.

Since
3.0
Parameters
DIWikiPage$subject
Returns
integer

◆ hasPendingJobs()

static SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::hasPendingJobs ( DIWikiPage  $subject)
static
Since
3.0
Parameters
DIWikiPage$subject
Returns
boolean

◆ planAsJob()

static SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::planAsJob ( DIWikiPage  $subject,
  $params = [] 
)
static

Called from PropertyChangePropagationNotifier

Since
3.0
Parameters
DIWikiPage$subject
array$params
Returns
boolean

◆ run()

SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::run ( )
See also
Job::run
Since
3.0

Member Data Documentation

◆ CACHE_NAMESPACE

const SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::CACHE_NAMESPACE = 'smw:chgprop'

Temp marker namespace

◆ CHUNK_SIZE

const SMW\MediaWiki\Jobs\ChangePropagationDispatchJob::CHUNK_SIZE = 1000

Size of rows stored in a temp file


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

About | General disclaimer | Privacy policy