BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
SMW\DeferredRequestDispatchManager Class Reference
Inheritance diagram for SMW\DeferredRequestDispatchManager:
Collaboration diagram for SMW\DeferredRequestDispatchManager:

Public Member Functions

 __construct (HttpRequest $httpRequest, JobFactory $jobFactory)
 
 reset ()
 
 setLogger (LoggerInterface $logger)
 
 isEnabledHttpDeferredRequest ($isEnabledHttpDeferredRequest)
 
 isPreferredWithJobQueue ($isPreferredWithJobQueue)
 
 isCommandLineMode ($isCommandLineMode)
 
 isEnabledJobQueue ($isEnabledJobQueue)
 
 dispatchParserCachePurgeJobWith (Title $title=null, $parameters=array())
 
 dispatchFulltextSearchTableUpdateJobWith (Title $title=null, $parameters=array())
 
 dispatchTempChangeOpPurgeJobWith (Title $title=null, $parameters=array())
 
 dispatchJobRequestWith ($type, Title $title=null, $parameters=array())
 

Detailed Description

During the storage of a page, sometimes it is necessary to create extra processing requests that should be executed asynchronously (due to large DB processing time or is a secondary update) but without delay of the current transaction. This class initiates and creates a separate request to be handled by the receiving SpecialDeferredRequestDispatcher endpoint (if it can connect).

DeferredRequestDispatchManager allows to invoke jobs independent from the job scheduler with the objective to be run timely to the current transaction without having to wait on the job scheduler and without blocking the current request.

GNU GPL v2+

Since
2.3
Author
mwjames

Constructor & Destructor Documentation

SMW\DeferredRequestDispatchManager::__construct ( HttpRequest  $httpRequest,
JobFactory  $jobFactory 
)
Since
2.3
Parameters
HttpRequest$httpRequest
JobFactory$jobFactory

Member Function Documentation

SMW\DeferredRequestDispatchManager::dispatchFulltextSearchTableUpdateJobWith ( Title  $title = null,
  $parameters = array() 
)
Since
2.5
Parameters
Title | null$title
array$parameters
SMW\DeferredRequestDispatchManager::dispatchJobRequestWith (   $type,
Title  $title = null,
  $parameters = array() 
)
Since
2.3
Parameters
string$type
Title | null$title
array$parameters
SMW\DeferredRequestDispatchManager::dispatchParserCachePurgeJobWith ( Title  $title = null,
  $parameters = array() 
)
Since
2.4
Parameters
Title | null$title
array$parameters
SMW\DeferredRequestDispatchManager::dispatchTempChangeOpPurgeJobWith ( Title  $title = null,
  $parameters = array() 
)
Since
2.5
Parameters
Title | null$title
array$parameters
SMW\DeferredRequestDispatchManager::isCommandLineMode (   $isCommandLineMode)
See Also
https://www.mediawiki.org/wiki/Manual:$wgCommandLineMode Indicates whether MW is running in command-line mode.
Since
2.5
Parameters
boolean$isCommandLineMode
SMW\DeferredRequestDispatchManager::isEnabledHttpDeferredRequest (   $isEnabledHttpDeferredRequest)
Since
2.3
Parameters
boolean$isEnabledHttpDeferredRequest
SMW\DeferredRequestDispatchManager::isEnabledJobQueue (   $isEnabledJobQueue)
Since
2.5
Parameters
boolean$isEnabledJobQueue
SMW\DeferredRequestDispatchManager::isPreferredWithJobQueue (   $isPreferredWithJobQueue)

Certain types of jobs or tasks may prefer to be executed using the job queue therefore indicate whether the dispatcher should try opening a http request or not.

Since
2.5
Parameters
boolean$isPreferredWithJobQueue
SMW\DeferredRequestDispatchManager::reset ( )
Since
2.3
SMW\DeferredRequestDispatchManager::setLogger ( LoggerInterface  $logger)
See Also
LoggerAwareInterface::setLogger
Since
2.5
Parameters
LoggerInterface$logger

Implements Psr\Log\LoggerAwareInterface.


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