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
Modifier and TypeFieldDescriptionstatic final String
Identifier for version 1.0 of the PCM checksum calculation algorithm.static final Logger
Logger for this class.protected static final String
Separator character for the same hierarchy level.protected static final String
Separator character for closing a hierarchy level.protected static final String
Separator character for the opening a new hierarchy level. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
calculate
(ServiceSpecification specification) Calculates the checksum for the provided specification.identify()
void
update
(ServiceSpecification specification) Updates the checksum of the provided specification.static void
updateChecksum
(Checksum checksum, String string) Updates checksum with the given string.protected void
updateChecksumWithSignature
(Checksum checksum, org.palladiosimulator.pcm.repository.Signature signature) Updates the checksum with details about the signatures.protected void
updateChecksumWithSignature
(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:SpecificationChecksumCalculator
Updates the checksum of the provided specification. Throws a runtime exception if the calculation fails, e.g. the specification language is not supported.- Specified by:
update
in interfaceSpecificationChecksumCalculator
- Parameters:
specification
- The performance specification.
-
calculate
Description copied from interface:SpecificationChecksumCalculator
Calculates the checksum for the provided specification. Throws a runtime exception if the calculation fails, e.g. the specification language is not supported.- Specified by:
calculate
in 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:
identify
in 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.
-