com.hazelcast.com.fasterxml.jackson.core.sym

## Class ByteQuadsCanonicalizer

- java.lang.Object
- - com.hazelcast.com.fasterxml.jackson.core.sym.ByteQuadsCanonicalizer

-     public final class ByteQuadsCanonicalizer
      extends Object

  Replacement for `BytesToNameCanonicalizer` which aims at more localized memory access due to flattening of name quad data. Performance improvement modest for simple JSON document data binding (maybe 3%), but should help more for larger symbol tables, or for binary formats like Smile.
  Since:
    2.6

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_reportTooManyCollisions()`
    `String` | `addName(String name, int q1)`
    `String` | `addName(String name, int[] q, int qlen)`
    `String` | `addName(String name, int q1, int q2)`
    `String` | `addName(String name, int q1, int q2, int q3)`
    `int` | `bucketCount()` Returns number of primary slots table has currently
    `int` | `calcHash(int q1)`
    `int` | `calcHash(int[] q, int qlen)`
    `int` | `calcHash(int q1, int q2)`
    `int` | `calcHash(int q1, int q2, int q3)`
    `static ByteQuadsCanonicalizer` | `createRoot()` Factory method to call to create a symbol table instance with a randomized seed value.
    `protected static ByteQuadsCanonicalizer` | `createRoot(int seed)`
    `String` | `findName(int q1)`
    `String` | `findName(int[] q, int qlen)`
    `String` | `findName(int q1, int q2)`
    `String` | `findName(int q1, int q2, int q3)`
    `int` | `hashSeed()`
    `ByteQuadsCanonicalizer` | `makeChild(int flags)` Factory method used to create actual symbol table instance to use for parsing.
    `boolean` | `maybeDirty()` Method called to check to quickly see if a child symbol table may have gotten additional entries.
    `int` | `primaryCount()` Method mostly needed by unit tests; calculates number of entries that are in the primary slot set.
    `void` | `release()` Method called by the using code to indicate it is done with this instance.
    `int` | `secondaryCount()` Method mostly needed by unit tests; calculates number of entries in secondary buckets
    `int` | `size()`
    `int` | `spilloverCount()` Method mostly needed by unit tests; calculates number of entries in shared spillover area
    `int` | `tertiaryCount()` Method mostly needed by unit tests; calculates number of entries in tertiary buckets
    `String` | `toString()`
    `int` | `totalCount()`

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

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

- - ### Method Detail

    - #### createRoot

          public static ByteQuadsCanonicalizer createRoot()

      Factory method to call to create a symbol table instance with a randomized seed value.

    - #### createRoot

          protected static ByteQuadsCanonicalizer createRoot(int seed)

    - #### makeChild

          public ByteQuadsCanonicalizer makeChild(int flags)

      Factory method used to create actual symbol table instance to use for parsing.

    - #### release

          public void release()

      Method called by the using code to indicate it is done with this instance. This lets instance merge accumulated changes into parent (if need be), safely and efficiently, and without calling code having to know about parent information.

    - #### size

          public int size()

    - #### bucketCount

          public int bucketCount()

      Returns number of primary slots table has currently

    - #### maybeDirty

          public boolean maybeDirty()

      Method called to check to quickly see if a child symbol table may have gotten additional entries. Used for checking to see if a child table should be merged into shared table.

    - #### hashSeed

          public int hashSeed()

    - #### primaryCount

          public int primaryCount()

      Method mostly needed by unit tests; calculates number of entries that are in the primary slot set. These are "perfect" entries, accessible with a single lookup

    - #### secondaryCount

          public int secondaryCount()

      Method mostly needed by unit tests; calculates number of entries in secondary buckets

    - #### tertiaryCount

          public int tertiaryCount()

      Method mostly needed by unit tests; calculates number of entries in tertiary buckets

    - #### spilloverCount

          public int spilloverCount()

      Method mostly needed by unit tests; calculates number of entries in shared spillover area

    - #### totalCount

          public int totalCount()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### findName

          public String findName(int q1)

    - #### findName

          public String findName(int q1,
                                 int q2)

    - #### findName

          public String findName(int q1,
                                 int q2,
                                 int q3)

    - #### findName

          public String findName(int[] q,
                                 int qlen)

    - #### addName

          public String addName(String name,
                                int q1)

    - #### addName

          public String addName(String name,
                                int q1,
                                int q2)

    - #### addName

          public String addName(String name,
                                int q1,
                                int q2,
                                int q3)

    - #### addName

          public String addName(String name,
                                int[] q,
                                int qlen)

    - #### calcHash

          public int calcHash(int q1)

    - #### calcHash

          public int calcHash(int q1,
                              int q2)

    - #### calcHash

          public int calcHash(int q1,
                              int q2,
                              int q3)

    - #### calcHash

          public int calcHash(int[] q,
                              int qlen)

    - #### _reportTooManyCollisions

          protected void _reportTooManyCollisions()

Copyright © 2019. All rights reserved.