org.apache.ignite.internal.util

## Class GridCollections

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

    public final class GridCollections
    extends Object

Provides locked wrappers around given maps and collections. Since `ReentrantLock` performs a lot better than standard Java `synchronization`, these locked wrappers should perform better as their analogous methods in `java.util.Collections` class.

### Method Summary

All Methods Static Methods Concrete Methods
`static <E> Collection<E>` `lockedCollection(Collection<E> c)` Gets locked collection wrapping given set.
`static <K,V> Map<K,V>` `lockedMap(Map<K,V> m)` Gets locked map wrapping given map.
`static <E> Set<E>` `lockedSet(Set<E> s)` Gets locked set wrapping given set.

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

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

### Method Detail

#### lockedMap

    public static <K,V> Map<K,V> lockedMap(Map<K,V> m)

Gets locked map wrapping given map.

Parameters:
  `m` - Map to wrap into locked implementation.
Returns:
  Locked map.

#### lockedSet

    public static <E> Set<E> lockedSet(Set<E> s)

Gets locked set wrapping given set.

Parameters:
  `s` - Set to wrap into locked implementation.
Returns:
  Locked set.

#### lockedCollection

    public static <E> Collection<E> lockedCollection(Collection<E> c)

Gets locked collection wrapping given set.

Parameters:
  `c` - Collection to wrap into locked implementation.
Returns:
  Locked collection.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018