Class OffsetSimultaneousEncoder

java.lang.Object
io.confluent.parallelconsumer.offsets.OffsetSimultaneousEncoder

public class OffsetSimultaneousEncoder extends Object
Encode with multiple strategies at the same time.

Have results in an accessible structure, easily selecting the highest compression.

See Also:
  • Field Details

    • LARGE_INPUT_MAP_SIZE_THRESHOLD

      public static final int LARGE_INPUT_MAP_SIZE_THRESHOLD
      Size threshold in bytes after which compressing the encodings will be compared, as it seems to be typically worth the extra compression step when beyond this size in the source array.
      See Also:
    • compressionForced

      public static boolean compressionForced
      Force the encoder to also add the compressed versions. Useful for testing.

      Visible for testing.

    • COMPRESSION_FORCED_RESOURCE_LOCK

      public static final String COMPRESSION_FORCED_RESOURCE_LOCK
      Used to prevent tests running in parallel that depends on setting static state in this class. Manipulation of static state in tests needs to be removed to this isn't necessary.
      See Also:
  • Constructor Details

    • OffsetSimultaneousEncoder

      public OffsetSimultaneousEncoder(long baseOffsetToCommit, long highestSucceededOffset, Set<Long> incompleteOffsets)
  • Method Details