Package com.zfabrik.impl.dev
Class CoreRevisionCheckResource
java.lang.Object
com.zfabrik.resources.provider.Resource
com.zfabrik.impl.dev.CoreRevisionCheckResource
- All Implemented Interfaces:
IDependencyComponent
Core revision checking resource implementing the component type
com.zfabrik.coreRevisionCheck
.
The purpose of this component type is
to enable a core revision requirement checking before attaining a particular
system state. Currently the core build no (see Foundation.getCoreBuildVersion()
is used is core revision. Using this component
type an expectation of a certain core build no can be tested.
When the present core revision is found to be too old, the revision checker may respond in two ways: Either
- Terminate the local VM (default)
- Throw an exception that effectively makes sure a given system state cannot be reached
Supported properties:
- coreRevision.min
- The minimum core revision (build no. actually) expected
- coreRevision.failAction
- Specifies how to respond to a missed requirement. Either
terminate
(default) orerror
. The former leads to a termination of the local VM, the latter to an exception thrown by the checker.
A typical revision checker is declared like this:
com.zfabrik.component.type=com.zfabrik.coreRevisionCheck # # current version # coreRevision.min=201012122022 # # We throw an error # coreRevision.failAction=error # # make sure every process is checked # com.zfabrik.systemStates.participation=com.zfabrik.boot.main/process_up
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CoreRevisionCheckResource
-
-
Method Details
-
as
-
invalidate
- Overrides:
invalidate
in classResource
- Throws:
ResourceBusyException
-
prepare
public void prepare()- Specified by:
prepare
in interfaceIDependencyComponent
-