org.apache.ignite.internal.processors.cache

## Class GridCacheGateway<K,V>

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheGateway<K,V>

    @GridToStringExclude
    public class GridCacheGateway<K,V>
    extends Object

Cache gateway.

### Constructor Summary

Constructors
Constructor and Description
`GridCacheGateway(GridCacheContext<K,V> ctx)`

### Method Summary

Methods
`void` `block()`
`void` `enter()` Enter a cache call.
`CacheOperationContext` `enter(CacheOperationContext opCtx)`
`boolean` `enterIfNotStopped()` Enter a cache call.
`boolean` `enterIfNotStoppedNoLock()` Enter a cache call without lock.
`CacheOperationContext` `enterNoLock(CacheOperationContext opCtx)`
`void` `leave()` Leave a cache call entered by `enter()` method.
`void` `leave(CacheOperationContext prev)`
`void` `leaveNoLock()` Leave a cache call entered by `enterNoLock(org.apache.ignite.internal.processors.cache.CacheOperationContext)` method.
`void` `leaveNoLock(CacheOperationContext prev)`
`void` `onStopped()`

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

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

### Constructor Detail

#### GridCacheGateway

    public GridCacheGateway(GridCacheContext<K,V> ctx)

Parameters:
  `ctx` - Cache context.

### Method Detail

#### enter

    public void enter()

Enter a cache call.

#### enterIfNotStopped

    public boolean enterIfNotStopped()

Enter a cache call.

Returns:
  `True` if enter successful, `false` if the cache or the node was stopped.

#### enterIfNotStoppedNoLock

    public boolean enterIfNotStoppedNoLock()

Enter a cache call without lock.

Returns:
  `True` if enter successful, `false` if the cache or the node was stopped.

#### leaveNoLock

    public void leaveNoLock()

Leave a cache call entered by `enterNoLock(org.apache.ignite.internal.processors.cache.CacheOperationContext)` method.

#### leave

    public void leave()

Leave a cache call entered by `enter()` method.

#### enter

    @Nullable
    public CacheOperationContext enter(@Nullable
                                       CacheOperationContext opCtx)

Parameters:
  `opCtx` - Cache operation context to guard.
Returns:
  Previous operation context set on this thread.

#### enterNoLock

    @Nullable
    public CacheOperationContext enterNoLock(@Nullable
                                             CacheOperationContext opCtx)

Parameters:
  `opCtx` - Operation context to guard.
Returns:
  Previous operation context set on this thread.

#### leave

    public void leave(CacheOperationContext prev)

Parameters:
  `prev` - Previous.

#### leaveNoLock

    public void leaveNoLock(CacheOperationContext prev)

Parameters:
  `prev` - Previous.

#### block

    public void block()

#### onStopped

    public void onStopped()

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.3.0-incubating
Release Date | : July 10 2015