Class PolarisEventMetadataFactory

java.lang.Object
org.apache.polaris.service.events.PolarisEventMetadataFactory

@ApplicationScoped public class PolarisEventMetadataFactory extends Object
  • Constructor Details

    • PolarisEventMetadataFactory

      public PolarisEventMetadataFactory()
  • Method Details

    • create

      public PolarisEventMetadata create()
      Creates a new event metadata object.

      This method should only be called with the request scope active in production. It may be called outside the request scope in tests, in which case some fields may be missing.

    • copy

      Creates a copy of the given metadata, with a new timestamp and new OpenTelemetry context.

      Contrary to create(), this method does not require an active request scope, and is safe to use from any thread, e.g. from a task executor thread.