Interface ChangesetIdentifierSupplier<T>

Type Parameters:
T - the type of changeset identifier produced
All Known Implementing Classes:
ChangelogSupplier

@Incubating public interface ChangesetIdentifierSupplier<T>
A source of changeset identifiers or timestamps for use with temporal or audited data.

Changeset ids produced by the supplier must be distinct and monotonically increasing. Note, however, that unless the database is in serializable isolation mode, transactions themselves do not have a well-defined total order. Therefore, the changeset ids are ordered by the moment at which they are obtained; approximately, by the instant at which the transaction started. This must be taken into account when interpreting the results of historical queries against a temporal table or audit log. The historical changes cannot be linearized by transaction completion time, since the completion time of a transaction is never known when the records are written to the history table or audit log.

Since:
7.4
See Also:
API Note:
A changeset id or timestamp is assumed to be constant during a transaction. The supplier does not have to be aware of transaction contexts, and so it is the responsibility of the client to ensure that the supplier is called no more than once in a transaction.
  • Method Summary

    Modifier and Type
    Method
    Description
    Called once per transaction to obtain the changeset identifier
  • Method Details

    • generateIdentifier

      T generateIdentifier(SharedSessionContract session)
      Called once per transaction to obtain the changeset identifier
      Parameters:
      session - the current session
      Returns:
      the changeset identifier