Class GridCacheAtomicLongImpl

    • Method Detail

      • get

        public long get()
        Gets current value of atomic long.
        Specified by:
        get in interface IgniteAtomicLong
        Returns:
        Current value of atomic long.
      • incrementAndGet

        public long incrementAndGet()
        Increments and gets current value of atomic long.
        Specified by:
        incrementAndGet in interface IgniteAtomicLong
        Returns:
        Value.
      • getAndIncrement

        public long getAndIncrement()
        Gets and increments current value of atomic long.
        Specified by:
        getAndIncrement in interface IgniteAtomicLong
        Returns:
        Value.
      • addAndGet

        public long addAndGet​(long l)
        Adds l and gets current value of atomic long.
        Specified by:
        addAndGet in interface IgniteAtomicLong
        Parameters:
        l - Number which will be added.
        Returns:
        Value.
      • getAndAdd

        public long getAndAdd​(long l)
        Gets current value of atomic long and adds l.
        Specified by:
        getAndAdd in interface IgniteAtomicLong
        Parameters:
        l - Number which will be added.
        Returns:
        Value.
      • decrementAndGet

        public long decrementAndGet()
        Decrements and gets current value of atomic long.
        Specified by:
        decrementAndGet in interface IgniteAtomicLong
        Returns:
        Value.
      • getAndDecrement

        public long getAndDecrement()
        Gets and decrements current value of atomic long.
        Specified by:
        getAndDecrement in interface IgniteAtomicLong
        Returns:
        Value.
      • getAndSet

        public long getAndSet​(long l)
        Gets current value of atomic long and sets new value l of atomic long.
        Specified by:
        getAndSet in interface IgniteAtomicLong
        Parameters:
        l - New value of atomic long.
        Returns:
        Value.
      • compareAndSet

        public boolean compareAndSet​(long expVal,
                                     long newVal)
        Atomically compares current value to the expected value, and if they are equal, sets current value to new value.
        Specified by:
        compareAndSet in interface IgniteAtomicLong
        Parameters:
        expVal - Expected atomic long's value.
        newVal - New atomic long's value to set if current value equal to expected value.
        Returns:
        True if comparison succeeded, false otherwise.
      • compareAndSetAndGet

        public long compareAndSetAndGet​(long expVal,
                                        long newVal)
        Parameters:
        expVal - Expected value.
        newVal - New value.
        Returns:
        Old value.