Class VersionHandler
- java.lang.Object
-
- org.somda.sdc.biceps.provider.preprocessing.VersionHandler
-
- All Implemented Interfaces:
DescriptionPreprocessingSegment,StatePreprocessingSegment
public class VersionHandler extends Object implements DescriptionPreprocessingSegment, StatePreprocessingSegment
Preprocessing segment that manages BICEPS versioning.The segment takes care of incrementing descriptor and state versions. It maintains a map of latest versions independent of the data that is stored in the
MdibStorage. This facilitates the alignment of versions without prematurely storing them in theMdibStorage.If an error is thrown during processing, the versions stored internally in the version handler are not going to be tainted.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterLastModification(MdibDescriptionModifications modifications, MdibStorage storage)Function that is invoked after the last modification in the processing chain has been applied.voidafterLastModification(MdibStateModifications modifications, MdibStorage storage)Function that is invoked after the last modification in the processing chain has been applied.voidbeforeFirstModification(MdibDescriptionModifications modifications, MdibStorage storage)Function that is invoked before the first modification in the processing chain is applied.voidbeforeFirstModification(MdibStateModifications modifications, MdibStorage storage)Function that is invoked before the first modification in the processing chain is applied.voidprocess(MdibDescriptionModifications modifications, MdibDescriptionModification modification, MdibStorage storage)In a sequence of modifications this function processes one modification.voidprocess(MdibStateModifications modifications, AbstractState state, MdibStorage storage)In a sequence of modifications this function processes one modification.StringtoString()
-
-
-
Method Detail
-
beforeFirstModification
public void beforeFirstModification(MdibDescriptionModifications modifications, MdibStorage storage)
Description copied from interface:DescriptionPreprocessingSegmentFunction that is invoked before the first modification in the processing chain is applied.Default behavior is do nothing.
- Specified by:
beforeFirstModificationin interfaceDescriptionPreprocessingSegment- Parameters:
modifications- all modifications for preprocessing.storage- the MDIB storage to be used by the callback.
-
afterLastModification
public void afterLastModification(MdibDescriptionModifications modifications, MdibStorage storage)
Description copied from interface:DescriptionPreprocessingSegmentFunction that is invoked after the last modification in the processing chain has been applied.Default behavior is do nothing.
- Specified by:
afterLastModificationin interfaceDescriptionPreprocessingSegment- Parameters:
modifications- all modifications for preprocessing.storage- the MDIB storage to be used by the callback.
-
beforeFirstModification
public void beforeFirstModification(MdibStateModifications modifications, MdibStorage storage)
Description copied from interface:StatePreprocessingSegmentFunction that is invoked before the first modification in the processing chain is applied.Default behavior is do nothing.
- Specified by:
beforeFirstModificationin interfaceStatePreprocessingSegment- Parameters:
modifications- all modifications for preprocessing.storage- the MDIB storage to be used by the callback.
-
afterLastModification
public void afterLastModification(MdibStateModifications modifications, MdibStorage storage)
Description copied from interface:StatePreprocessingSegmentFunction that is invoked after the last modification in the processing chain has been applied.Default behavior is do nothing.
- Specified by:
afterLastModificationin interfaceStatePreprocessingSegment- Parameters:
modifications- all modifications for preprocessing.storage- the MDIB storage to be used by the callback.
-
process
public void process(MdibDescriptionModifications modifications, MdibDescriptionModification modification, MdibStorage storage) throws VersioningException
Description copied from interface:DescriptionPreprocessingSegmentIn a sequence of modifications this function processes one modification.- Specified by:
processin interfaceDescriptionPreprocessingSegment- Parameters:
modifications- all modifications.modification- the current modification to be processed.storage- the MDIB storage for access.- Throws:
VersioningException
-
process
public void process(MdibStateModifications modifications, AbstractState state, MdibStorage storage) throws VersioningException
Description copied from interface:StatePreprocessingSegmentIn a sequence of modifications this function processes one modification.- Specified by:
processin interfaceStatePreprocessingSegment- Parameters:
modifications- all modifications that are being processed.state- the current modification to be processed.storage- the MDIB storage for access.- Throws:
VersioningException
-
-