Class Checksum_PCM_10

java.lang.Object
org.palladiosimulator.analyzer.quality.util.Checksum_PCM_10
All Implemented Interfaces:
SpecificationChecksumCalculator

public class Checksum_PCM_10 extends Object implements SpecificationChecksumCalculator
Checksum calculation algorithm for PCM.
  • Field Details

    • LOGGER

      public static final Logger LOGGER
      Logger for this class.
    • CHECKSUM_PCM_10_IDENTIFIER

      public static final String CHECKSUM_PCM_10_IDENTIFIER
      Identifier for version 1.0 of the PCM checksum calculation algorithm.
      See Also:
    • SEPARATOR

      protected static final String SEPARATOR
      Separator character for the same hierarchy level. Improves readability for humans. Technically not necessary.
      See Also:
    • SEPARATOR_HIERARCHY_START

      protected static final String SEPARATOR_HIERARCHY_START
      Separator character for the opening a new hierarchy level. Improves readability for humans. Technically not necessary.
      See Also:
    • SEPARATOR_HIERARCHY_END

      protected static final String 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

      public void update(ServiceSpecification specification)
      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 interface SpecificationChecksumCalculator
      Parameters:
      specification - The performance specification.
    • calculate

      public long calculate(ServiceSpecification specification)
      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 interface SpecificationChecksumCalculator
      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

      public String identify()
      Specified by:
      identify in interface SpecificationChecksumCalculator
      Returns:
      The unique identifier for this algorithm.
    • updateChecksum

      public static void updateChecksum(Checksum checksum, String string)
      Updates checksum with the given string.
      Parameters:
      checksum - Checksum generator and storage.
      string - String used to update the checksum.