Class OffsetMapCodecManager<K,​V>

java.lang.Object
io.confluent.parallelconsumer.OffsetMapCodecManager<K,​V>

public class OffsetMapCodecManager<K,​V>
extends java.lang.Object
Uses multiple encodings to compare, when decided, can refactor other options out for analysis only - encodeOffsetsCompressed(long, org.apache.kafka.common.TopicPartition, java.util.Set<java.lang.Long>)

TODO: consider IO exception management - question sneaky throws usage?

TODO: enforce max uncommitted < encoding length (Short.MAX)

Bitset serialisation format:

  • byte1: magic
  • byte2-3: Short: bitset size
  • byte4-n: serialised BitSet
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.nio.charset.Charset CHARSET_TO_USE  
    static int DefaultMaxMetadataSize
    Maximum size of the commit offset metadata
    static java.util.Optional<OffsetEncoding> forcedCodec
    Forces the use of a specific codec, instead of choosing the most efficient one.
  • Constructor Summary

    Constructors 
    Constructor Description
    OffsetMapCodecManager​(WorkManager<K,​V> wm, org.apache.kafka.clients.consumer.Consumer<K,​V> consumer)  
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait