Class DbCdcsClient

java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.db.DbCdcsClient

public class DbCdcsClient extends AbstractApiClient
Group Operation regarding Cdc for a DB
  • Constructor Details

    • DbCdcsClient

      public DbCdcsClient(String token, String databaseId)
      As immutable object use builder to initiate the object.
      Parameters:
      token - authenticated token
      databaseId - database identifier
    • DbCdcsClient

      public DbCdcsClient(String token, ApiLocator.AstraEnvironment env, String databaseId)
      As immutable object use builder to initiate the object.
      Parameters:
      env - define target environment to be used
      token - authenticated token
      databaseId - database identifier
  • Method Details

    • findAll

      public Stream<CdcDefinition> findAll()
      Access Cdc component for a DB.
      Returns:
      list of cdc
    • findById

      public Optional<CdcDefinition> findById(String cdcId)
      Find a cdc by its id.
      Parameters:
      cdcId - identifier
      Returns:
      cdc definition if exist
    • findByDefinition

      public Optional<CdcDefinition> findByDefinition(String keyspace, String table, String tenant)
      Find the cdc based on its components.
      Parameters:
      keyspace - keyspace name
      table - table name
      tenant - tenant identifier
      Returns:
      definition if present
    • create

      public void create(String keyspace, String table, String tenant, int topicPartition)
      Create cdc from definition.
      Parameters:
      keyspace - keyspace name
      table - table name
      tenant - tenant identifier
      topicPartition - topic partition
    • delete

      public void delete(String cdcId)
      Delete cdc from its identifier.
      Parameters:
      cdcId - cdc identifier
    • delete

      public void delete(String keyspace, String table, String tenant)
      Delete cdc from its identifier.
      Parameters:
      keyspace - keyspace name
      table - table name
      tenant - tenant identifier