Package

io.snappydata

collection

Permalink

package collection

Visibility
  1. Public
  2. All

Type Members

  1. final class ByteBufferData extends AnyRef

    Permalink
  2. final class ByteBufferHashMap extends AnyRef

    Permalink

    A HashMap implementation using a serialized ByteBuffer for key data and another one for value data.

    A HashMap implementation using a serialized ByteBuffer for key data and another one for value data. Key data is required to hold fixed-width values while the value data will be written back-to-back as new data is inserted into the map. Key data is stored in the following format:

      .------------------------ Offset into value data (4 bytes)
      |   .-------------------- Hash code (4 bytes)
      |   |
      |   |        .----------- Fixed-width fields of key data
      |   |        |        .-- Padding for 8 byte word alignment
      V   V        V        V
    +---+---+-------------+---+
    |   |   | ... ... ... |   |
    +---+---+-------------+---+
     \-----/ \------------/\--/
      header      body    padding

    If key has variable length data, then it should be appended to the value data. The offset+hash code is read as a single long where LSB is used for hash code while MSB is used for offset, so the two can be reverse in actual memory layout on big-endian machines. Since there is no disk storage of this map so no attempt is made to have consistent endianness or memory layout of the data.

    Rehash of the map (when loadFactor exceeds) moves around the above key fields to create a new array as per the new hash locations. The value fields are left untouched with the headers of keys having the offsets into value array as before the rehash.

  3. abstract class LongKey extends AnyRef

    Permalink
  4. final class ObjectHashSet[T <: AnyRef] extends Iterable[T] with Serializable

    Permalink

    A fast hash set implementation for non-null data.

    A fast hash set implementation for non-null data. This hash set supports insertions and updates, but not deletions. It is much faster than Java's standard HashSet while using much less memory overhead.

    A special feature of this set is that it allows using the key objects for storing additional data too and allows update of the same by the new passed in key when it matches existing key in the map. Hence it can be used as a more efficient map that uses a single object for both key and value parts (and user's key object can be coded to be so).

    Adapted from Spark's OpenHashSet implementation. It deliberately uses java interfaces to keep byte code overheads minimal.

  5. final class ObjectHashSetMemoryConsumer extends MemoryConsumer

    Permalink

Value Members

  1. object ObjectHashSet extends Serializable

    Permalink

Ungrouped