Interface Counter

    • Method Detail

      • compareAndSwap

        default long compareAndSwap​(long expect,
                                    long update)
        Deprecated.
        Description copied from interface: SyncCounter
        Atomically updates the counter using a compare-and-swap operation.
        Specified by:
        compareAndSwap in interface SyncCounter
        Parameters:
        expect - The expected value of the counter
        update - The new value of the counter
        Returns:
        The previous value of the counter
      • async

        default AsyncCounter async()
        Deprecated.
        Specified by:
        async in interface SyncCounter
        Returns:
        an asynchronous wrapper around this instance.