org.apache.ignite.internal.processors.platform.datastructures

## Class PlatformAtomicLong

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.PlatformAbstractTarget
  - - org.apache.ignite.internal.processors.platform.datastructures.PlatformAtomicLong

All Implemented Interfaces:
  PlatformTarget

    public class PlatformAtomicLong
    extends PlatformAbstractTarget

Platform atomic long wrapper.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`FALSE, log, platformCtx, TRUE`

### Constructor Summary

Constructors
Constructor and Description
`PlatformAtomicLong(PlatformContext ctx, GridCacheAtomicLongImpl atomicLong)` Ctor.

### Method Summary

Methods
`long` `addAndGet(long val)` Adds a value.
`void` `close()` Removes this atomic long.
`boolean` `compareAndSet(long cmp, long val)` Compares two values for equality and, if they are equal, replaces the first value.
`long` `compareAndSetAndGet(long expVal, long newVal)` Compares two values for equality and, if they are equal, replaces the first value.
`long` `decrementAndGet()` Decrements the value.
`long` `get()` Reads the value.
`long` `getAndAdd(long val)` Adds a value.
`long` `getAndDecrement()` Decrements the value.
`long` `getAndIncrement()` Increments the value.
`long` `getAndSet(long val)` Gets current value of atomic long and sets new value
`long` `incrementAndGet()` Increments the value.
`boolean` `isClosed()` Gets status of atomic.

### Methods inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`convertException, currentFuture, currentFutureWrapped, futureWriter, inObjectStreamOutStream, inStreamOutLong, inStreamOutObject, inStreamOutStream, listenFuture, listenFutureForOperation, outLong, outObject, outStream, platformContext, processInObjectStreamOutStream, processInStreamOutLong, processInStreamOutObject, processInStreamOutStream, processOutLong, processOutObject, processOutStream, throwUnsupported`

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

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

### Constructor Detail

#### PlatformAtomicLong

    public PlatformAtomicLong(PlatformContext ctx,
                      GridCacheAtomicLongImpl atomicLong)

Ctor.

Parameters:
  `ctx` - Context.
  `atomicLong` - AtomicLong to wrap.

### Method Detail

#### get

    public long get()

Reads the value.

Returns:
  Current atomic long value.

#### incrementAndGet

    public long incrementAndGet()

Increments the value.

Returns:
  Current atomic long value.

#### getAndIncrement

    public long getAndIncrement()

Increments the value.

Returns:
  Original atomic long value.

#### addAndGet

    public long addAndGet(long val)

Adds a value.

Returns:
  Current atomic long value.

#### getAndAdd

    public long getAndAdd(long val)

Adds a value.

Returns:
  Original atomic long value.

#### decrementAndGet

    public long decrementAndGet()

Decrements the value.

Returns:
  Current atomic long value.

#### getAndDecrement

    public long getAndDecrement()

Decrements the value.

Returns:
  Original atomic long value.

#### getAndSet

    public long getAndSet(long val)

Gets current value of atomic long and sets new value

Returns:
  Original atomic long value.

#### compareAndSetAndGet

    public long compareAndSetAndGet(long expVal,
                           long newVal)

Compares two values for equality and, if they are equal, replaces the first value.

Returns:
  Original atomic long value.

#### compareAndSet

    public boolean compareAndSet(long cmp,
                        long val)

Compares two values for equality and, if they are equal, replaces the first value.

Returns:
  Original atomic long value.

#### isClosed

    public boolean isClosed()

Gets status of atomic.

Returns:
  `true` if atomic was removed from cache, `false` in other case.

#### close

    public void close()

Removes this atomic long.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015