Interface CodecRegistrar

All Superinterfaces:
Extension
All Known Implementing Classes:
BuiltinDynamicCodecs
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CodecRegistrar extends Extension
Registrar interface that is used to register Codecs as extension to built-in codecs.

Implementations may use PostgresqlConnection to query Postgres information schema to discover type details such as extension type OIDs.

Constructor Requirements

Extension implementations must have a default constructor if registered via the ServiceLoader. When registered through PostgresqlConnectionConfiguration the default constructor is not required to be public. When registered via the ServiceLoader the default constructor must be public.

See Also:
  • Method Details

    • register

      Publisher<Void> register(PostgresqlConnection connection, io.netty.buffer.ByteBufAllocator allocator, CodecRegistry registry)
      Register Codec into CodecRegistry. Codecs should be registered using a deferred approach upon subscription.
      Parameters:
      connection - the connection to query the connected Postgres runtime instance
      allocator - the allocator for buffer allocation
      registry - target codec registry that accepts codec registrations
      Returns:
      a Publisher that activates codec registration upon subscription