Project

General

Profile

Improvement #1953

Support an offline mode that disables attempts to remote repositories

Added by Henning Blohm over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
z2-core
Target version:
Start date:
17.07.2016
Due date:
% Done:

0%

Estimated time:
origin:

Description

See Offline Mode:

Offline Mode

The purpose of the offline mode is twofold:

  • You may use the offline mode to avoid long synchronisation times when developing in a situation poor network connectivity without turning off network connectivity as a whole.
  • You may use the offline mode to prohibit download of latest changes from a central repository ahead of time. So you may use it as a "development in isolation" feature.

How the offline mode is used.

The offline mode is enabled or disabled by setting the system property com.zfabrik.offline to "true" or "false" respectively. The default value of this property is "false".

This works regardlessly of how this system property is set in the home process. Worker processes receive an updated value upon synchronization.

Enabling Offline mode at start time

Using the file <Z2 home>/run/bin/runtime.properties the offline mode can be enabled at starting time already. Not however that typically some collected offline content needs to be retrieved before working with a z2 system.

Toggling Offline Mode during Development

Alternatively the offline mode may be switched on or off using a check box on the Z2 gui.

Design

  • Component Repository use AbstractRepository.checkOffline() whenever a connection is normally required.

The method looks essentially like this:

    protected void checkOfflineMode() {
        if (Foundation.isOffline()) {
            throw new OfflineModeException("Running in offline mode");
        }
    }

where @Foundation.isOffline()* checks for the boolean String value of the system property com.zfabrik.offline.

  • Changing the system property can happen any time
  • Initially the property is assumed as false and should only be specified otherwise in runtime.properties.
  • The offline mode is conveyed to worker process via the COMMAND_COMPLETE message send to workers in the verify phase of the synchronization process.
  • There is a toggle checkbox in the GUI.


Related issues

Is duplicate of z2-Environment - Improvement #1943: Add an offline mode that is switchable in JMX and via the <home> GUIResolved17.02.2016Henning Blohm

Actions
#1

Updated by Henning Blohm over 8 years ago

  • Related to Improvement #1943: Add an offline mode that is switchable in JMX and via the <home> GUI added
#2

Updated by Henning Blohm over 8 years ago

  • Related to deleted (Improvement #1943: Add an offline mode that is switchable in JMX and via the <home> GUI)
#3

Updated by Henning Blohm over 8 years ago

  • Is duplicate of Improvement #1943: Add an offline mode that is switchable in JMX and via the <home> GUI added
#4

Updated by Henning Blohm over 8 years ago

  • Status changed from New to Closed

As Duplicate to #1943

#5

Updated by Henning Blohm over 8 years ago

  • Target version changed from 2.5 to 2.4.1

Also available in: Atom PDF