Class Checksum_PCM_10
java.lang.Object
org.palladiosimulator.analyzer.quality.util.Checksum_PCM_10
- All Implemented Interfaces:
SpecificationChecksumCalculator
Checksum calculation algorithm for PCM.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIdentifier for version 1.0 of the PCM checksum calculation algorithm.static final LoggerLogger for this class.protected static final StringSeparator character for the same hierarchy level.protected static final StringSeparator character for closing a hierarchy level.protected static final StringSeparator character for the opening a new hierarchy level. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcalculate(ServiceSpecification specification) Calculates the checksum for the provided specification.identify()voidupdate(ServiceSpecification specification) Updates the checksum of the provided specification.static voidupdateChecksum(Checksum checksum, String string) Updates checksum with the given string.protected voidupdateChecksumWithSignature(Checksum checksum, org.palladiosimulator.pcm.repository.Signature signature) Updates the checksum with details about the signatures.protected voidupdateChecksumWithSignature(Checksum checksum, org.palladiosimulator.pcm.resourcetype.ResourceSignature signature) Updates the checksum with details about the signatures.
-
Field Details
-
LOGGER
Logger for this class. -
CHECKSUM_PCM_10_IDENTIFIER
Identifier for version 1.0 of the PCM checksum calculation algorithm.- See Also:
-
SEPARATOR
Separator character for the same hierarchy level. Improves readability for humans. Technically not necessary.- See Also:
-
SEPARATOR_HIERARCHY_START
Separator character for the opening a new hierarchy level. Improves readability for humans. Technically not necessary.- See Also:
-
SEPARATOR_HIERARCHY_END
Separator character for closing a hierarchy level. Improves readability for humans. Technically not necessary.- See Also:
-
-
Constructor Details
-
Checksum_PCM_10
public Checksum_PCM_10()
-
-
Method Details
-
update
Description copied from interface:SpecificationChecksumCalculatorUpdates the checksum of the provided specification. Throws a runtime exception if the calculation fails, e.g. the specification language is not supported.- Specified by:
updatein interfaceSpecificationChecksumCalculator- Parameters:
specification- The performance specification.
-
calculate
Description copied from interface:SpecificationChecksumCalculatorCalculates the checksum for the provided specification. Throws a runtime exception if the calculation fails, e.g. the specification language is not supported.- Specified by:
calculatein interfaceSpecificationChecksumCalculator- Parameters:
specification- The performance specification.
-
updateChecksumWithSignature
protected void updateChecksumWithSignature(Checksum checksum, org.palladiosimulator.pcm.repository.Signature signature) Updates the checksum with details about the signatures.- Parameters:
checksum- The checksum.signature- The signature.
-
updateChecksumWithSignature
protected void updateChecksumWithSignature(Checksum checksum, org.palladiosimulator.pcm.resourcetype.ResourceSignature signature) Updates the checksum with details about the signatures.- Parameters:
checksum- The checksum.signature- The signature.
-
identify
- Specified by:
identifyin interfaceSpecificationChecksumCalculator- Returns:
- The unique identifier for this algorithm.
-
updateChecksum
Updates checksum with the given string.- Parameters:
checksum- Checksum generator and storage.string- String used to update the checksum.
-