Details

    Description

      com.liferay.portal.kernel.util.DeterminateKeyGenerator has been added to the API. It is easiest to describe what this class does with an example:

      DeterminateKeyGenerator.generate("hello") -> returns "somestring x"
      DeterminateKeyGenerator.generate("hello") -> returns "somestring y"
      DeterminateKeyGenerator.generate("hello") -> returns "somestring z"

      The actual returned value is not "something x" but some other hash value that is predictable (determinate) based on a math algorithm. It will also return a DIFFERENT value every time you call it, until you call reset().

      Once you call DeterminateKeyGenerator.reset(), then the next time you call

      DeterminateKeyGenerator.generate("hello") -> returns "something x" etc and repeats the above pattern.

      This pattern is guaranteed to always be "determinate" per thread.

      Suppose 3 threads call this same class, the first time all three threads call:

      DeterminateKeyGenerator.generate("hello") --> will return "something x", etc.

      Attachments

        Issue Links

          Activity

            People

              mark.jin Mark Jin (Inactive)
              brian.chan Brian Chan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Packages

                  Version Package
                  5.1 EE SP5 (5.1.8)
                  5.2 EE SP4 (5.2.8)