Interface IgniteAtomicReference<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Removes this atomic reference.
      boolean compareAndSet​(T expVal, T newVal)
      Conditionally sets the new value.
      T get()
      Gets current value of an atomic reference.
      String name()
      Name of atomic reference.
      boolean removed()
      Gets status of atomic.
      void set​(T val)
      Unconditionally sets the value.
    • Method Detail

      • name

        String name()
        Name of atomic reference.
        Returns:
        Name of an atomic reference.
      • get

        T get()
        throws IgniteException
        Gets current value of an atomic reference.
        Returns:
        current value of an atomic reference.
        Throws:
        IgniteException - If operation failed.
      • compareAndSet

        boolean compareAndSet​(T expVal,
                              T newVal)
                       throws IgniteException
        Conditionally sets the new value. That will be set if expVal is equal to current value respectively.
        Parameters:
        expVal - Expected value.
        newVal - New value.
        Returns:
        Result of operation execution. If true than value have been updated.
        Throws:
        IgniteException - If operation failed.
      • removed

        boolean removed()
        Gets status of atomic.
        Returns:
        true if an atomic reference was removed from cache, false otherwise.