org.apache.ignite.internal.util

## Class GridHandleTable

- java.lang.Object
- - org.apache.ignite.internal.util.GridHandleTable

    public class GridHandleTable
    extends Object

Lightweight identity hash table which maps objects to integer handles, assigned in ascending order.

### Constructor Summary

Constructors
Constructor and Description
`GridHandleTable(int initCap, float loadFactor)` Creates new HandleTable with given capacity and load factor.

### Method Summary

Methods
`void` `clear()` Resets table to its initial (empty) state.
`int` `lookup(Object obj)` Looks up and returns handle associated with given object, or -1 if no mapping found.
`Object[]` `objects()`

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

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

### Constructor Detail

#### GridHandleTable

    public GridHandleTable(int initCap,
                   float loadFactor)

Creates new HandleTable with given capacity and load factor.

Parameters:
  `initCap` - Initial capacity.
  `loadFactor` - Load factor.

### Method Detail

#### lookup

    public int lookup(Object obj)

Looks up and returns handle associated with given object, or -1 if no mapping found.

Parameters:
  `obj` - Object.
Returns:
  Handle.

#### clear

    public void clear()

Resets table to its initial (empty) state.

#### objects

    public Object[] objects()

Returns:
  Returns objects that were added to handles table.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017