org.apache.ignite.internal.util

## Class GridAtomicInitializer<T>

- java.lang.Object
- - org.apache.ignite.internal.util.GridAtomicInitializer<T>

    public class GridAtomicInitializer<T>
    extends Object

Executes initialization operation once.

### Constructor Summary

Constructors
Constructor and Description
`GridAtomicInitializer()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `await()` Await for completion.
`T` `init(Callable<T> c)` Executes initialization operation only once.
`T` `result()` Should be called only if succeeded.
`boolean` `succeeded()`
`String` `toString()`

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

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

### Constructor Detail

#### GridAtomicInitializer

    public GridAtomicInitializer()

### Method Detail

#### init

    public T init(Callable<T> c)
           throws IgniteCheckedException

Executes initialization operation only once.

Parameters:
  `c` - Initialization operation.
Returns:
  Result of initialization.
Throws:
  `IgniteCheckedException` - If failed.

#### succeeded

    public boolean succeeded()

Returns:
  True, if initialization was already successfully completed.

#### result

    public T result()

Should be called only if succeeded.

Returns:
  Result.

#### await

    public boolean await()
                  throws IgniteInterruptedCheckedException

Await for completion.

Returns:
  `true` If initialization was completed successfully.
Throws:
  `IgniteInterruptedCheckedException` - If thread was interrupted.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021