org.apache.ignite.streamer.index.hash

## Class StreamerHashIndexProvider<E,K,V>

- java.lang.Object
- - org.apache.ignite.streamer.index.StreamerIndexProviderAdapter<E,K,V>
  - - org.apache.ignite.streamer.index.hash.StreamerHashIndexProvider<E,K,V>

All Implemented Interfaces:
  StreamerIndexProvider<E,K,V>, StreamerIndexProviderMBean

    public class StreamerHashIndexProvider<E,K,V>
    extends StreamerIndexProviderAdapter<E,K,V>

Hash index implementation of a `StreamerIndexProvider`.

This implementation uses a concurrent hash map, which is extremely efficient for CRUD operations. It does not, however, maintain the ordering of entries, so, operations which imply ordering are not supported.

If ordering is required, consider using `StreamerTreeIndexProvider`.

See Also:
  `StreamerTreeIndexProvider`

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.ignite.streamer.index.StreamerIndexProviderAdapter

`StreamerIndexProviderAdapter.DedupTrackingEntry<E,K,V>, StreamerIndexProviderAdapter.Entry<E,K,V>, StreamerIndexProviderAdapter.EventTrackingEntry<E,K,V>, StreamerIndexProviderAdapter.IndexKey<V>, StreamerIndexProviderAdapter.NonTrackingEntry<E,K,V>`

### Field Summary

### Fields inherited from class org.apache.ignite.streamer.index.StreamerIndexProviderAdapter

`entryToKey, entryToVal`

### Constructor Summary

Constructors
Constructor and Description
`StreamerHashIndexProvider()`

### Method Summary

Methods
`protected void` `add(E evt, K key, StreamerIndexUpdateSync sync)` Add event to the index.
`protected void` `endUpdate0(StreamerIndexUpdateSync sync, E evt, K key, boolean rollback)`
`protected StreamerIndex<E,K,V>` `index0()`
`void` `initialize()` Initializes the index.
`protected void` `remove(E evt, K key, StreamerIndexUpdateSync sync)` Remove event from the index.
`void` `reset0()` Called on reset.
`boolean` `sorted()` Returns `true` if index supports sorting and therefore can perform range operations.

### Methods inherited from class org.apache.ignite.streamer.index.StreamerIndexProviderAdapter

`add, addEvent, addToCollection, addToMap, dispose, endUpdate, eventsCount, getName, getPolicy, getUpdater, index, isUnique, lockIndexKey, name, newEntry, policy, readLock, readUnlock, remove, removeEvent, removeFromCollection, removeFromMap, reset, setName, setPolicy, setUnique, setUpdater, size, toString, trieGet, unique, unlockIndexKey, updaterClass, writeLock, writeUnlock`

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

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

### Constructor Detail

#### StreamerHashIndexProvider

    public StreamerHashIndexProvider()

### Method Detail

#### index0

    protected StreamerIndex<E,K,V> index0()

Specified by:
  `index0` in class `StreamerIndexProviderAdapter<E,K,V>`
Returns:
  Index

#### initialize

    public void initialize()

Initializes the index.

#### reset0

    public void reset0()

Called on reset.

Specified by:
  `reset0` in class `StreamerIndexProviderAdapter<E,K,V>`

#### add

    protected void add(E evt,
           K key,
           StreamerIndexUpdateSync sync)

Add event to the index.

Specified by:
  `add` in class `StreamerIndexProviderAdapter<E,K,V>`
Parameters:
  `evt` - Event.
  `key` - key.
  `sync` - Sync.

#### remove

    protected void remove(E evt,
              K key,
              StreamerIndexUpdateSync sync)

Remove event from the index.

Specified by:
  `remove` in class `StreamerIndexProviderAdapter<E,K,V>`
Parameters:
  `evt` - Event.
  `key` - Key.
  `sync` - Sync.

#### endUpdate0

    protected void endUpdate0(StreamerIndexUpdateSync sync,
                  E evt,
                  K key,
                  boolean rollback)

Specified by:
  `endUpdate0` in class `StreamerIndexProviderAdapter<E,K,V>`
Parameters:
  `sync` - Sync.
  `evt` - Event.
  `key` - Key.
  `rollback` - Rollback flag.

#### sorted

    public boolean sorted()

Returns `true` if index supports sorting and therefore can perform range operations.

Returns:
  Index sorted flag.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015