org.apache.ignite.internal.processors.query.stat.hll.serialization

## Class HLLMetadata

- java.lang.Object
- - org.apache.ignite.internal.processors.query.stat.hll.serialization.HLLMetadata

All Implemented Interfaces:
  IHLLMetadata

    public class HLLMetadata
    extends Object
    implements IHLLMetadata

A concrete `IHLLMetadata` implemented as a simple struct.

### Constructor Summary

Constructors
Constructor and Description
`HLLMetadata(int schemaVersion, HLLType type, int registerCountLog2, int registerWidth, int log2ExplicitCutoff, boolean explicitOff, boolean explicitAuto, boolean sparseEnabled)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `explicitAuto()`
`boolean` `explicitOff()`
`HLLType` `HLLType()`
`int` `log2ExplicitCutoff()`
`int` `registerCountLog2()`
`int` `registerWidth()`
`int` `schemaVersion()`
`boolean` `sparseEnabled()`
`String` `toString()`

### Methods inherited from class java.lang.Object

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

### Constructor Detail

#### HLLMetadata

    public HLLMetadata(int schemaVersion,
                       HLLType type,
                       int registerCountLog2,
                       int registerWidth,
                       int log2ExplicitCutoff,
                       boolean explicitOff,
                       boolean explicitAuto,
                       boolean sparseEnabled)

Parameters:
  `schemaVersion` - the schema version number of the HLL. This must be greater than or equal to zero.
  `type` - the `type` of the HLL. This cannot be `null`.
  `registerCountLog2` - the log-base-2 register count parameter for probabilistic HLLs. This must be greater than or equal to zero.
  `registerWidth` - the register width parameter for probabilistic HLLs. This must be greater than or equal to zero.
  `log2ExplicitCutoff` - the log-base-2 of the explicit cardinality cutoff, if it is explicitly defined. (If `explicitOff` or `explicitAuto` is `true` then this has no meaning.)
  `explicitOff` - the flag for 'explicit off'-mode, where the `HLLType.EXPLICIT` representation is not used. Both this and `explicitAuto` cannot be `true` at the same time.
  `explicitAuto` - the flag for 'explicit auto'-mode, where the `HLLType.EXPLICIT` representation's promotion cutoff is determined based on in-memory size automatically. Both this and `explicitOff` cannot be `true` at the same time.
  `sparseEnabled` - the flag for 'sparse-enabled'-mode, where the `HLLType.SPARSE` representation is used.

### Method Detail

#### schemaVersion

    public int schemaVersion()

Specified by:
  `schemaVersion` in interface `IHLLMetadata`
Returns:
  the schema version of the HLL. This will never be `null`.

#### HLLType

    public HLLType HLLType()

Specified by:
  `HLLType` in interface `IHLLMetadata`
Returns:
  the type of the HLL. This will never be `null`.

#### registerCountLog2

    public int registerCountLog2()

Specified by:
  `registerCountLog2` in interface `IHLLMetadata`
Returns:
  the log-base-2 of the register count parameter of the HLL. This will always be greater than or equal to 4 and less than or equal to 31.

#### registerWidth

    public int registerWidth()

Specified by:
  `registerWidth` in interface `IHLLMetadata`
Returns:
  the register width parameter of the HLL. This will always be greater than or equal to 1 and less than or equal to 8.

#### log2ExplicitCutoff

    public int log2ExplicitCutoff()

Specified by:
  `log2ExplicitCutoff` in interface `IHLLMetadata`
Returns:
  the log-base-2 of the explicit cutoff cardinality. This will always be greater than or equal to zero and less than 31, per the specification.

#### explicitOff

    public boolean explicitOff()

Specified by:
  `explicitOff` in interface `IHLLMetadata`
Returns:
  `true` if the `HLLType.EXPLICIT` representation has been disabled. `false` otherwise.

#### explicitAuto

    public boolean explicitAuto()

Specified by:
  `explicitAuto` in interface `IHLLMetadata`
Returns:
  `true` if the `HLLType.EXPLICIT` representation cutoff cardinality is set to be automatically chosen, `false` otherwise.

#### sparseEnabled

    public boolean sparseEnabled()

Specified by:
  `sparseEnabled` in interface `IHLLMetadata`
Returns:
  `true` if the `HLLType.SPARSE` representation is enabled.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022