Class TTDKeyValueTable

  • All Implemented Interfaces:
    dev.responsive.kafka.internal.db.RemoteKVTable, dev.responsive.kafka.internal.db.RemoteTable<org.apache.kafka.common.utils.Bytes>

    public class TTDKeyValueTable
    extends TTDTable<org.apache.kafka.common.utils.Bytes>
    implements dev.responsive.kafka.internal.db.RemoteKVTable
    • Field Summary

      • Fields inherited from class dev.responsive.kafka.internal.stores.TTDTable

        time
    • Constructor Summary

      Constructors 
      Constructor Description
      TTDKeyValueTable​(dev.responsive.kafka.internal.db.spec.CassandraTableSpec spec, TTDCassandraClient client)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.kafka.streams.state.KeyValueIterator<org.apache.kafka.common.utils.Bytes,​byte[]> all​(int partition, long minValidTs)  
      long count()  
      static TTDKeyValueTable create​(dev.responsive.kafka.internal.db.spec.CassandraTableSpec spec, dev.responsive.kafka.internal.db.CassandraClient client)  
      com.datastax.oss.driver.api.core.cql.BoundStatement delete​(int partitionKey, org.apache.kafka.common.utils.Bytes key)  
      byte[] get​(int partition, org.apache.kafka.common.utils.Bytes key, long minValidTs)  
      com.datastax.oss.driver.api.core.cql.BoundStatement insert​(int partitionKey, org.apache.kafka.common.utils.Bytes key, byte[] value, long epochMillis)  
      java.lang.String name()  
      org.apache.kafka.streams.state.KeyValueIterator<org.apache.kafka.common.utils.Bytes,​byte[]> range​(int partition, org.apache.kafka.common.utils.Bytes from, org.apache.kafka.common.utils.Bytes to, long minValidTs)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface dev.responsive.kafka.internal.db.RemoteTable

        approximateNumEntries, init, metadata, setOffset
    • Constructor Detail

      • TTDKeyValueTable

        public TTDKeyValueTable​(dev.responsive.kafka.internal.db.spec.CassandraTableSpec spec,
                                TTDCassandraClient client)
    • Method Detail

      • create

        public static TTDKeyValueTable create​(dev.responsive.kafka.internal.db.spec.CassandraTableSpec spec,
                                              dev.responsive.kafka.internal.db.CassandraClient client)
      • count

        public long count()
        Specified by:
        count in class TTDTable<org.apache.kafka.common.utils.Bytes>
        Returns:
        the number of elements in this table or 0 if the schema has no such table
      • name

        public java.lang.String name()
        Specified by:
        name in interface dev.responsive.kafka.internal.db.RemoteTable<org.apache.kafka.common.utils.Bytes>
      • insert

        public com.datastax.oss.driver.api.core.cql.BoundStatement insert​(int partitionKey,
                                                                          org.apache.kafka.common.utils.Bytes key,
                                                                          byte[] value,
                                                                          long epochMillis)
        Specified by:
        insert in interface dev.responsive.kafka.internal.db.RemoteTable<org.apache.kafka.common.utils.Bytes>
      • delete

        public com.datastax.oss.driver.api.core.cql.BoundStatement delete​(int partitionKey,
                                                                          org.apache.kafka.common.utils.Bytes key)
        Specified by:
        delete in interface dev.responsive.kafka.internal.db.RemoteTable<org.apache.kafka.common.utils.Bytes>
      • get

        public byte[] get​(int partition,
                          org.apache.kafka.common.utils.Bytes key,
                          long minValidTs)
        Specified by:
        get in interface dev.responsive.kafka.internal.db.RemoteKVTable
      • range

        public org.apache.kafka.streams.state.KeyValueIterator<org.apache.kafka.common.utils.Bytes,​byte[]> range​(int partition,
                                                                                                                       org.apache.kafka.common.utils.Bytes from,
                                                                                                                       org.apache.kafka.common.utils.Bytes to,
                                                                                                                       long minValidTs)
        Specified by:
        range in interface dev.responsive.kafka.internal.db.RemoteKVTable
      • all

        public org.apache.kafka.streams.state.KeyValueIterator<org.apache.kafka.common.utils.Bytes,​byte[]> all​(int partition,
                                                                                                                     long minValidTs)
        Specified by:
        all in interface dev.responsive.kafka.internal.db.RemoteKVTable