Packages

c

io.aiven.guardian.kafka.compaction

PostgresJDBCDatabase

class PostgresJDBCDatabase extends DatabaseInterface

A Postgres Database backed by JDBC which uses the Postgres COPY command to insert data into the database. Note that since this uses JDBC and CopyManager, its implementation is blocking under the hood.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PostgresJDBCDatabase
  2. DatabaseInterface
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PostgresJDBCDatabase()(implicit executionContext: ExecutionContext, materializer: Materializer, conn: Connection)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. def streamInsert(kafkaStorageSource: Source[ReducedConsumerRecord, NotUsed], encodeKafkaRowToByteString: Flow[ReducedConsumerRecord, ByteString, NotUsed]): Future[Long]

    Inserts data into a Postgres Database using the COPY method (see https://www.postgresql.org/docs/9.4/sql-copy.html).

    Inserts data into a Postgres Database using the COPY method (see https://www.postgresql.org/docs/9.4/sql-copy.html). This means the data insertion is buffered and also extremely fast since it bypasses internal parts of the Postgres engine which are not necessary.

    Since it uses JDBC plus java.io.InputStream under the hood, the operation is inherently blocking even though it returns a scala.concurrent.Future. Due to this we have used blocking IO dispatchers to avoid problems that are typical of blocking IO

    returns

    Number of rows updated

    Definition Classes
    PostgresJDBCDatabaseDatabaseInterface
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from DatabaseInterface

Inherited from AnyRef

Inherited from Any

Ungrouped