Interface ISystemState


public interface ISystemState
System states are abstract target configurations of a z2 environment at runtime.

System states are declared as components of type com.zfabrik.systemState.

The most important use-case of this is the heterogeneous designation of worker processes to different purposes using the system state mechanism. In essence, the runtime should only download resources of component and execute components as far as required for the implemented scenario. The system state mechanism allows to define scenario requirements via a graph of system state and component dependencies. See also the worker process javadoc.

System states can be attained. Attaining a system state translates to preparing (see IDependencyComponent) all components that declare a participation in the state using the configuration property STATES_PARTICIPATION or by declaring STATES_DEPENDENCY on the state.

System states implement IDependencyComponent. When preparing, all dependencies will be prepared as well. This happens during any verification and synchronization so that system state's will be re-enforced at that point in time.

For example, the system state com.zfabrik.boot.main/process_up is declared like this:

 #
 # a system state
 #
 com.zfabrik.component.type=com.zfabrik.systemState
 #
 # it's a generalization that applies to worker processes
 # as well as home processes. For example, the distributed
 # component provisioning participates in this state to advertise
 # itself at the package management
 #
 com.zfabrik.systemStates.participation=\
           com.zfabrik.boot.main/home_up,\
           com.zfabrik.boot.main/worker_up
 #
 #
 
Author:
hb
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    State components declare dependency on other components by specifying a comma-separated list of component names.
    static final String
    Components declare participation in a state components life cycle by specifying a comma-separated list of component names.
    static final String
    Type of a system state component.
  • Field Details

    • TYPE

      static final String TYPE
      Type of a system state component.
      See Also:
    • STATES_DEPENDENCY

      static final String STATES_DEPENDENCY
      State components declare dependency on other components by specifying a comma-separated list of component names. All components will be queried for implementations of IDependencyComponent and will be invoked when the state component gets prepared, which is in particular
      • upon statisfaction of component dependencies (see IComponentDescriptor.DEPENDENCIES
      • at all verifications/synchronizations for states that are or are depending on home or worker target states
      State dependencies will therefore be revisited recurringly. This make system states a mechanism to (re-) enforce system health.
      See Also:
    • STATES_PARTICIPATION

      static final String STATES_PARTICIPATION
      Components declare participation in a state components life cycle by specifying a comma-separated list of component names. A component participated with, requires all participating components to be prepared and will be dependendant on its participating components. This is in effect simply the same dependency impact as achieved by a STATES_DEPENDENCY declaration but declared on the other end of the vector.
      See Also: