Packages

class BackupClient[T <: KafkaConsumerInterface] extends BackupClientInterface[T]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BackupClient
  2. BackupClientInterface
  3. LazyLogging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BackupClient(maybeGoogleSettings: Option[GoogleSettings])(implicit kafkaClientInterface: T, backupConfig: Backup, system: ActorSystem, gcsConfig: GCS)

Type Members

  1. case class PreviousState(stateDetails: StateDetails, previousKey: String) extends Product with Serializable
    Definition Classes
    BackupClientInterface
  2. case class StateDetails(state: State, backupObjectMetadata: BackupObjectMetadata) extends Product with Serializable
    Definition Classes
    BackupClientInterface
  3. case class UploadStateResult(current: Option[StateDetails], previous: Option[PreviousState]) extends Product with Serializable
    Definition Classes
    BackupClientInterface
  4. type BackupResult = Option[StorageObject]

    Override this type to define the result of backing up data to a datasource

    Override this type to define the result of backing up data to a datasource

    Definition Classes
    BackupClientBackupClientInterface
  5. type State = Nothing

    Override this type to define the result of calculating the previous state (if it exists)

    Override this type to define the result of calculating the previous state (if it exists)

    Definition Classes
    BackupClientBackupClientInterface

Value Members

  1. object UploadStateResult extends Serializable
    Definition Classes
    BackupClientInterface
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##: Int
    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def backup: RunnableGraph[T.MatCombineResult]

    The entire flow that involves reading from Kafka, transforming the data into JSON and then backing it up into a data source.

    The entire flow that involves reading from Kafka, transforming the data into JSON and then backing it up into a data source.

    returns

    The KafkaClientInterface.Control which depends on the implementation of T (typically this is used to control the underlying stream).

    Definition Classes
    BackupClientInterface
  7. implicit val backupConfig: Backup
    Definition Classes
    BackupClientBackupClientInterface
  8. def backupToStorageSink(key: String, currentState: Option[Nothing]): Sink[(ByteString, T.CursorContext), Future[BackupResult]]

    Override this method to define how to backup a pekko.util.ByteString combined with Kafka kafkaClientInterface.CursorContext to a DataSource

    Override this method to define how to backup a pekko.util.ByteString combined with Kafka kafkaClientInterface.CursorContext to a DataSource

    key

    The object key or filename for what is being backed up

    currentState

    The current state if it exists. If this is empty then a new backup is being created with the associated key otherwise if this contains a State then the defined pekko.stream.scaladsl.Sink needs to handle resuming a previously unfinished backup with that key by directly appending the pekko.util.ByteString data.

    returns

    A pekko.stream.scaladsl.Sink that given a pekko.util.ByteString (containing a single Kafka io.aiven.guardian.kafka.models.ReducedConsumerRecord) along with its kafkaClientInterface.CursorContext backs up the data to your data storage. The pekko.stream.scaladsl.Sink is also responsible for executing kafkaClientInterface.commitCursor when the data is successfully backed up

    Definition Classes
    BackupClientBackupClientInterface
  9. def backupToStorageTerminateSink(previousState: PreviousState): Sink[ByteString, Future[Option[StorageObject]]]

    A sink that is executed whenever a previously existing Backup needs to be terminated and closed.

    A sink that is executed whenever a previously existing Backup needs to be terminated and closed. Generally speaking this pekko.stream.scaladsl.Sink is similar to the backupToStorageSink except that kafkaClientInterface.CursorContext is not required since no Kafka messages are being written.

    Note that the terminate refers to the fact that this Sink is executed with a null] pekko.stream.scaladsl.Source which when written to an already existing unfinished backup terminates the containing JSON array so that it becomes valid parsable JSON.

    previousState

    A data structure containing both the State along with the associated key which you can refer to in order to define your pekko.stream.scaladsl.Sink

    returns

    A pekko.stream.scaladsl.Sink that points to an existing key defined by previousState.previousKey

    Definition Classes
    BackupClientBackupClientInterface
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  11. def empty: () => Future[Option[StorageObject]]

    Override this method to define a zero vale that covers the case that occurs immediately when SubFlow has been split at BackupStreamPosition.Start.

    Override this method to define a zero vale that covers the case that occurs immediately when SubFlow has been split at BackupStreamPosition.Start. If you have difficulties defining an empty value for BackupResult then you can wrap it in an Option and just use None for the empty case

    returns

    An "empty" value that is used when a split SubFlow has just started

    Definition Classes
    BackupClientBackupClientInterface
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. def getCurrentUploadState(key: String): Future[UploadStateResult]

    Override this method to define how to retrieve the current state of any unfinished backups.

    Override this method to define how to retrieve the current state of any unfinished backups.

    key

    The object key or filename for what is currently being backed up

    returns

    A scala.concurrent.Future with a UploadStateResult data structure that optionally contains the state associated with key along with the previous latest state before key (if it exists)

    Definition Classes
    BackupClientBackupClientInterface
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. implicit val kafkaClientInterface: T
    Definition Classes
    BackupClientBackupClientInterface
  19. lazy val logger: Logger
    Attributes
    protected
    Definition Classes
    LazyLogging
    Annotations
    @transient()
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. implicit val system: ActorSystem
    Definition Classes
    BackupClientBackupClientInterface
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  28. 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 BackupClientInterface[T]

Inherited from LazyLogging

Inherited from AnyRef

Inherited from Any

Ungrouped