\Horde_Kolab_Storage_Synchronization_TimeBased

Synchronization strategy that synchronizes at certain intervals.

Copyright 2012-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
synchronizeList()
synchronizeData()
No public properties found
No constants found
No protected methods found
$_strategy
N/A
hasNotBeenSynchronizedYet()
syncTimeHasElapsed()
$_interval
$_random_offset
N/A

Properties

$_interval

$_interval : integer

Kolab object cache resync interval with the IMAP server (in seconds).

Default: Two minutes

Type

integer

$_random_offset

$_random_offset : integer

Random offset added to each folder sync interval to prevent mass sync every XX minutes. Otherwise UI latency might get too high.

Type

integer

Methods

__construct()

__construct(integer  $interval = 120, integer  $random_offset = 90) 

Constructor.

Parameters

integer $interval

Kolab object cache resync interval with the IMAP server (in seconds).

integer $random_offset

Random offset added to each folder sync interval.

synchronizeList()

synchronizeList(\Horde_Kolab_Storage_List  $list) 

Synchronize the provided list in case the selected synchronization strategy requires it.

Parameters

\Horde_Kolab_Storage_List $list

The list to synchronize.

synchronizeData()

synchronizeData(\Horde_Kolab_Storage_Data  $data) 

Synchronize the provided data in case the selected synchronization strategy requires it.

Parameters

\Horde_Kolab_Storage_Data $data

The data to synchronize.

hasNotBeenSynchronizedYet()

hasNotBeenSynchronizedYet(string  $data_id) : boolean

Check if the data store with the given data ID has been synchronized already during this session.

Parameters

string $data_id

The ID of the data store.

Returns

boolean —

True, if the store has not been synchronized yet.

syncTimeHasElapsed()

syncTimeHasElapsed(string  $data_id) : boolean

Check if the data store with the given data ID need to be resynchronized with the backend.

Parameters

string $data_id

The ID of the data store.

Returns

boolean —

True, if the store needs to be synchronized again.