Project

General

Profile

Improvement #1943

Add an offline mode that is switchable in JMX and via the <home> GUI

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

Status:
Resolved
Priority:
Normal
Assignee:
Category:
z2-core
Target version:
Start date:
17.02.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

Has duplicate z2-Environment - Improvement #1953: Support an offline mode that disables attempts to remote repositoriesClosed17.07.2016Henning Blohm

Actions
#1

Updated by Henning Blohm about 8 years ago

  • Description updated (diff)
#2

Updated by Henning Blohm over 7 years ago

  • Status changed from New to In Progress
#3

Updated by Henning Blohm over 7 years ago

  • Subject changed from Add an online mode that is switchable in JMX and via the <home> GUI to Add an offline mode that is switchable in JMX and via the <home> GUI
#4

Updated by Henning Blohm over 7 years ago

  • Related to Improvement #1953: Support an offline mode that disables attempts to remote repositories added
#5

Updated by Henning Blohm over 7 years ago

  • Related to deleted (Improvement #1953: Support an offline mode that disables attempts to remote repositories)
#6

Updated by Henning Blohm over 7 years ago

  • Has duplicate Improvement #1953: Support an offline mode that disables attempts to remote repositories added
#7

Updated by Henning Blohm over 7 years ago

  • Description updated (diff)
#8

Updated by Henning Blohm over 7 years ago

  • Target version changed from 2.5 to 2.4.1
#9

Updated by Henning Blohm over 7 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF