org.apache.ignite.internal.processors.datastructures

## Class AtomicDataStructureProxy<V extends AtomicDataStructureValue>

- java.lang.Object
- - org.apache.ignite.internal.processors.datastructures.AtomicDataStructureProxy<V>

All Implemented Interfaces:
  IgniteChangeGlobalStateSupport, GridCacheRemovable

Direct Known Subclasses:
  GridCacheAtomicLongImpl, GridCacheAtomicReferenceImpl, GridCacheAtomicSequenceImpl, GridCacheAtomicStampedImpl, GridCacheCountDownLatchImpl, GridCacheLockImpl, GridCacheSemaphoreImpl

    public abstract class AtomicDataStructureProxy<V extends AtomicDataStructureValue>
    extends Object
    implements GridCacheRemovable, IgniteChangeGlobalStateSupport

Represents base class for atomic data structures.

### Field Summary

Fields
`protected IgniteInternalCache<GridCacheInternalKey,V>` `cacheView` Structure projection.
`protected GridCacheContext<GridCacheInternalKey,V>` `ctx` Cache context.
`protected GridCacheInternalKey` `key` Structure key.
`protected IgniteLogger` `log` Logger.
`protected String` `name` Structure name.
`protected boolean` `rmvd` Removed flag.

### Constructor Summary

Constructors
Constructor and Description
`AtomicDataStructureProxy()` Empty constructor required by `Externalizable`.
`AtomicDataStructureProxy(String name, GridCacheInternalKey key, IgniteInternalCache<GridCacheInternalKey,V> cacheView)` Default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `checkRemoved()` Check removed status.
`protected IgniteException` `checkRemovedAfterFail(Exception cause)` Checks removed status after fail.
`protected void` `invalidateLocalState()` Invalidates local state.
`GridCacheInternalKey` `key()`
`String` `name()`
`void` `needCheckNotRemoved()`
`void` `onActivate(GridKernalContext kctx)` Called when cluster performing activation.
`void` `onDeActivate(GridKernalContext kctx)` Called when cluster performing deactivation.
`boolean` `onRemoved()` Set status of data structure as removed.
`boolean` `removed()`
`void` `restart(IgniteInternalCache cache)` Would return this object work to normal.
`void` `suspend()` Would suspend calls for this object.

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

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

### Field Detail

#### log

    protected IgniteLogger log

Logger.

#### rmvd

    protected volatile boolean rmvd

Removed flag.

#### name

    protected String name

Structure name.

#### key

    protected GridCacheInternalKey key

Structure key.

#### cacheView

    protected IgniteInternalCache<GridCacheInternalKey,V extends AtomicDataStructureValue> cacheView

Structure projection.

#### ctx

    protected volatile GridCacheContext<GridCacheInternalKey,V extends AtomicDataStructureValue> ctx

Cache context.

### Constructor Detail

#### AtomicDataStructureProxy

    public AtomicDataStructureProxy()

Empty constructor required by `Externalizable`.

#### AtomicDataStructureProxy

    public AtomicDataStructureProxy(String name,
                                    GridCacheInternalKey key,
                                    IgniteInternalCache<GridCacheInternalKey,V> cacheView)

Default constructor.

Parameters:
  `name` - Structure name.
  `key` - Structure key.
  `cacheView` - Cache projection.

### Method Detail

#### name

    public String name()

Returns:
  Datastructure name.

#### key

    public GridCacheInternalKey key()

Returns:
  Key value.

#### removed

    public boolean removed()

Returns:
  Removed flag.

#### checkRemoved

    protected void checkRemoved()
                         throws IllegalStateException

Check removed status.

Throws:
  `IllegalStateException` - If removed.

#### checkRemovedAfterFail

    protected IgniteException checkRemovedAfterFail(Exception cause)

Checks removed status after fail.

Parameters:
  `cause` - Initial exception.
Returns:
  Ignite runtime exception that corresponds the original `cause`.

#### onRemoved

    public boolean onRemoved()

Set status of data structure as removed.

Specified by:
  `onRemoved` in interface `GridCacheRemovable`
Returns:
  Current status.

#### needCheckNotRemoved

    public void needCheckNotRemoved()

Specified by:
  `needCheckNotRemoved` in interface `GridCacheRemovable`

#### suspend

    public void suspend()

Would suspend calls for this object.

Specified by:
  `suspend` in interface `GridCacheRemovable`

#### restart

    public void restart(IgniteInternalCache cache)

Would return this object work to normal.

Specified by:
  `restart` in interface `GridCacheRemovable`
Parameters:
  `cache` - To update with.

#### onActivate

    public void onActivate(GridKernalContext kctx)
                    throws IgniteCheckedException

Called when cluster performing activation.

Specified by:
  `onActivate` in interface `IgniteChangeGlobalStateSupport`
Parameters:
  `kctx` - Kernal context.
Throws:
  `IgniteCheckedException` - If failed.

#### onDeActivate

    public void onDeActivate(GridKernalContext kctx)

Called when cluster performing deactivation.

Specified by:
  `onDeActivate` in interface `IgniteChangeGlobalStateSupport`
Parameters:
  `kctx` - Kernal context.

#### invalidateLocalState

    protected void invalidateLocalState()

Invalidates local state.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022