Actions
Offline Mode » History » Revision 5
« Previous |
Revision 5/6
(diff)
| Next »
Henning Blohm, 18.09.2016 17:49
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 can be turned on and off via a system property and interactively on the 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 inruntime.properties
. - The system property status is backed in a JMX MBean attribute of the newly created Foundation MBean.
- We use the internal JMX implementation to broadcast attribute changes to all worker processes.
- There is a toggle checkbox in the GUI.
Updated by Henning Blohm about 8 years ago · 5 revisions