org.apache.ignite.internal.util.offheap

## Class GridOffHeapMapFactory

- java.lang.Object
- - org.apache.ignite.internal.util.offheap.GridOffHeapMapFactory

    public class GridOffHeapMapFactory
    extends Object

Factory for off-heap maps.

### Constructor Summary

Constructors
Constructor and Description
`GridOffHeapMapFactory()`

### Method Summary

Methods
`static GridOffHeapMap` `unsafeMap(int concurrency, float load, long initCap)` Creates off-heap map based on `Unsafe` implementation.
`static <K> GridOffHeapMap` `unsafeMap(int concurrency, float load, long initCap, long totalMem, short lruStripes, GridOffHeapEvictListener lsnr)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.
`static GridOffHeapMap` `unsafeMap(int concurrency, long initCap)` Creates off-heap map based on `Unsafe` implementation.
`static GridOffHeapMap` `unsafeMap(int concurrency, long initCap, long totalMem, short lruStripes, GridOffHeapEvictListener lsnr)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.
`static GridOffHeapMap` `unsafeMap(long initCap)` Creates off-heap map based on `Unsafe` implementation with unlimited memory.
`static GridOffHeapMap` `unsafeMap(long initCap, long totalMem, short lruStripes)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.
`static GridOffHeapMap` `unsafeMap(long initCap, long totalMem, short lruStripes, GridOffHeapEvictListener lsnr)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.
`static GridOffHeapPartitionedMap` `unsafePartitionedMap(int parts, int concurrency, float load, long initCap)` Creates off-heap map based on `Unsafe` implementation.
`static GridOffHeapPartitionedMap` `unsafePartitionedMap(int parts, int concurrency, float load, long initCap, long totalMem, short lruStripes, GridOffHeapEvictListener lsnr)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.
`static GridOffHeapPartitionedMap` `unsafePartitionedMap(int parts, int concurrency, long initCap)` Creates off-heap map based on `Unsafe` implementation.
`static GridOffHeapPartitionedMap` `unsafePartitionedMap(int parts, int concurrency, long initCap, long totalMem, short lruStripes, GridOffHeapEvictListener lsnr)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.
`static GridOffHeapPartitionedMap` `unsafePartitionedMap(int parts, long initCap)` Creates off-heap map based on `Unsafe` implementation with unlimited memory.
`static GridOffHeapPartitionedMap` `unsafePartitionedMap(int parts, long initCap, long totalMem, short lruStripes)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.
`static GridOffHeapPartitionedMap` `unsafePartitionedMap(int parts, long initCap, long totalMem, short lruStripes, GridOffHeapEvictListener lsnr)` Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

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

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

### Constructor Detail

#### GridOffHeapMapFactory

    public GridOffHeapMapFactory()

### Method Detail

#### unsafeMap

    public static GridOffHeapMap unsafeMap(long initCap)

Creates off-heap map based on `Unsafe` implementation with unlimited memory.

Parameters:
  `initCap` - Initial capacity.
Returns:
  Off-heap map.

#### unsafeMap

    public static GridOffHeapMap unsafeMap(int concurrency,
                           long initCap)

Creates off-heap map based on `Unsafe` implementation.

Parameters:
  `concurrency` - Concurrency.
  `initCap` - Initial capacity.
Returns:
  Off-heap map.

#### unsafeMap

    public static GridOffHeapMap unsafeMap(int concurrency,
                           float load,
                           long initCap)

Creates off-heap map based on `Unsafe` implementation.

Parameters:
  `concurrency` - Concurrency.
  `load` - Load factor.
  `initCap` - Initial capacity.
Returns:
  Off-heap map.

#### unsafeMap

    public static GridOffHeapMap unsafeMap(long initCap,
                           long totalMem,
                           short lruStripes)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
Returns:
  Off-heap map.

#### unsafeMap

    public static GridOffHeapMap unsafeMap(long initCap,
                           long totalMem,
                           short lruStripes,
                           @Nullable
                           GridOffHeapEvictListener lsnr)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
  `lsnr` - Optional eviction listener which gets notified every time an entry is evicted.
Returns:
  Off-heap map.

#### unsafeMap

    public static GridOffHeapMap unsafeMap(int concurrency,
                           long initCap,
                           long totalMem,
                           short lruStripes,
                           @Nullable
                           GridOffHeapEvictListener lsnr)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `concurrency` - Concurrency.
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
  `lsnr` - Optional eviction listener which gets notified every time an entry is evicted.
Returns:
  Off-heap map.

#### unsafeMap

    public static <K> GridOffHeapMap unsafeMap(int concurrency,
                               float load,
                               long initCap,
                               long totalMem,
                               short lruStripes,
                               @Nullable
                               GridOffHeapEvictListener lsnr)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `concurrency` - Concurrency.
  `load` - Load factor.
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
  `lsnr` - Optional eviction listener which gets notified every time an entry is evicted.
Returns:
  Off-heap map.

#### unsafePartitionedMap

    public static GridOffHeapPartitionedMap unsafePartitionedMap(int parts,
                                                 long initCap)

Creates off-heap map based on `Unsafe` implementation with unlimited memory.

Parameters:
  `parts` - Partitions.
  `initCap` - Initial capacity.
Returns:
  Off-heap map.

#### unsafePartitionedMap

    public static GridOffHeapPartitionedMap unsafePartitionedMap(int parts,
                                                 int concurrency,
                                                 long initCap)

Creates off-heap map based on `Unsafe` implementation.

Parameters:
  `parts` - Partitions.
  `concurrency` - Concurrency.
  `initCap` - Initial capacity.
Returns:
  Off-heap map.

#### unsafePartitionedMap

    public static GridOffHeapPartitionedMap unsafePartitionedMap(int parts,
                                                 int concurrency,
                                                 float load,
                                                 long initCap)

Creates off-heap map based on `Unsafe` implementation.

Parameters:
  `parts` - Partitions.
  `concurrency` - Concurrency.
  `load` - Load factor.
  `initCap` - Initial capacity.
Returns:
  Off-heap map.

#### unsafePartitionedMap

    public static GridOffHeapPartitionedMap unsafePartitionedMap(int parts,
                                                 long initCap,
                                                 long totalMem,
                                                 short lruStripes)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `parts` - Partitions.
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
Returns:
  Off-heap map.

#### unsafePartitionedMap

    public static GridOffHeapPartitionedMap unsafePartitionedMap(int parts,
                                                 long initCap,
                                                 long totalMem,
                                                 short lruStripes,
                                                 @Nullable
                                                 GridOffHeapEvictListener lsnr)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `parts` - Partitions.
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
  `lsnr` - Optional eviction listener which gets notified every time an entry is evicted.
Returns:
  Off-heap map.

#### unsafePartitionedMap

    public static GridOffHeapPartitionedMap unsafePartitionedMap(int parts,
                                                 int concurrency,
                                                 long initCap,
                                                 long totalMem,
                                                 short lruStripes,
                                                 @Nullable
                                                 GridOffHeapEvictListener lsnr)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `parts` - Partitions.
  `concurrency` - Concurrency.
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
  `lsnr` - Optional eviction listener which gets notified every time an entry is evicted.
Returns:
  Off-heap map.

#### unsafePartitionedMap

    public static GridOffHeapPartitionedMap unsafePartitionedMap(int parts,
                                                 int concurrency,
                                                 float load,
                                                 long initCap,
                                                 long totalMem,
                                                 short lruStripes,
                                                 @Nullable
                                                 GridOffHeapEvictListener lsnr)

Creates off-heap map based on `Unsafe` implementation with limited memory and LRU-based eviction.

Parameters:
  `parts` - Partitions.
  `concurrency` - Concurrency.
  `load` - Load factor.
  `initCap` - Initial capacity.
  `totalMem` - Total memory.
  `lruStripes` - Number of LRU stripes.
  `lsnr` - Optional eviction listener which gets notified every time an entry is evicted.
Returns:
  Off-heap map.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0-b1
Release Date | : December 1 2015