MediaWiki master
ConcatenatedGzipHistoryBlob Class Reference

Concatenated gzip (CGZ) storage Improves compression ratio by concatenating like objects before gzipping. More...

Inherits HistoryBlob.

Collaboration diagram for ConcatenatedGzipHistoryBlob:

Public Member Functions

 __construct ()
 
 __sleep ()
 
 __wakeup ()
 
 addItem ( $text)
 
 compress ()
 Compress the bulk data in the object.
 
 getItem ( $hash)
 
 getText ()
 
 isHappy ()
 Helper function for compression jobs Returns true until the object is "full" and ready to be committed.
 
 removeItem ( $hash)
 Remove an item.
 
 setText ( $text)
 
 uncompress ()
 Uncompress bulk data.
 

Public Attributes

bool $mCompressed = false
 
string $mDefaultHash = ''
 
string[] string $mItems = []
 Array if uncompressed, string if compressed.
 
int $mMaxCount = 100
 
int $mMaxSize = 10_000_000
 
int $mSize = 0
 
int $mVersion = 0
 

Detailed Description

Concatenated gzip (CGZ) storage Improves compression ratio by concatenating like objects before gzipping.

WARNING: Objects of this class are serialized and permanently stored in the DB. Do not change the name or visibility of any property!

Definition at line 30 of file ConcatenatedGzipHistoryBlob.php.

Constructor & Destructor Documentation

◆ __construct()

ConcatenatedGzipHistoryBlob::__construct ( )

Definition at line 46 of file ConcatenatedGzipHistoryBlob.php.

Member Function Documentation

◆ __sleep()

ConcatenatedGzipHistoryBlob::__sleep ( )
Returns
array

Definition at line 130 of file ConcatenatedGzipHistoryBlob.php.

References compress().

◆ __wakeup()

ConcatenatedGzipHistoryBlob::__wakeup ( )

Definition at line 135 of file ConcatenatedGzipHistoryBlob.php.

References uncompress().

◆ addItem()

ConcatenatedGzipHistoryBlob::addItem ( $text)
Parameters
string$text
Returns
string

Implements HistoryBlob.

Definition at line 57 of file ConcatenatedGzipHistoryBlob.php.

References uncompress().

Referenced by setText().

◆ compress()

ConcatenatedGzipHistoryBlob::compress ( )

Compress the bulk data in the object.

Definition at line 110 of file ConcatenatedGzipHistoryBlob.php.

Referenced by __sleep().

◆ getItem()

ConcatenatedGzipHistoryBlob::getItem ( $hash)
Parameters
string$hash
Returns
string|false

Implements HistoryBlob.

Definition at line 71 of file ConcatenatedGzipHistoryBlob.php.

References uncompress().

Referenced by getText().

◆ getText()

ConcatenatedGzipHistoryBlob::getText ( )
Returns
string|false

Implements HistoryBlob.

Definition at line 92 of file ConcatenatedGzipHistoryBlob.php.

References getItem(), and uncompress().

◆ isHappy()

ConcatenatedGzipHistoryBlob::isHappy ( )

Helper function for compression jobs Returns true until the object is "full" and ready to be committed.

Returns
bool

Definition at line 145 of file ConcatenatedGzipHistoryBlob.php.

References $mMaxCount.

◆ removeItem()

ConcatenatedGzipHistoryBlob::removeItem ( $hash)

Remove an item.

Parameters
string$hash

Definition at line 102 of file ConcatenatedGzipHistoryBlob.php.

◆ setText()

ConcatenatedGzipHistoryBlob::setText ( $text)
Parameters
string$text
Returns
void

Implements HistoryBlob.

Definition at line 84 of file ConcatenatedGzipHistoryBlob.php.

References addItem(), and uncompress().

◆ uncompress()

ConcatenatedGzipHistoryBlob::uncompress ( )

Uncompress bulk data.

Definition at line 120 of file ConcatenatedGzipHistoryBlob.php.

Referenced by __wakeup(), addItem(), getItem(), getText(), and setText().

Member Data Documentation

◆ $mCompressed

bool ConcatenatedGzipHistoryBlob::$mCompressed = false

Definition at line 34 of file ConcatenatedGzipHistoryBlob.php.

◆ $mDefaultHash

string ConcatenatedGzipHistoryBlob::$mDefaultHash = ''

Definition at line 38 of file ConcatenatedGzipHistoryBlob.php.

◆ $mItems

string [] string ConcatenatedGzipHistoryBlob::$mItems = []

Array if uncompressed, string if compressed.

Definition at line 36 of file ConcatenatedGzipHistoryBlob.php.

◆ $mMaxCount

int ConcatenatedGzipHistoryBlob::$mMaxCount = 100

Definition at line 44 of file ConcatenatedGzipHistoryBlob.php.

Referenced by isHappy().

◆ $mMaxSize

int ConcatenatedGzipHistoryBlob::$mMaxSize = 10_000_000

Definition at line 42 of file ConcatenatedGzipHistoryBlob.php.

◆ $mSize

int ConcatenatedGzipHistoryBlob::$mSize = 0

Definition at line 40 of file ConcatenatedGzipHistoryBlob.php.

◆ $mVersion

int ConcatenatedGzipHistoryBlob::$mVersion = 0

Definition at line 32 of file ConcatenatedGzipHistoryBlob.php.


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