Interface Counter

  • All Superinterfaces:
    BaseCounter, SyncCounter

    @Deprecated
    public interface Counter
    extends SyncCounter
    Deprecated.
    Since 5.2 and to be removed in a future version. Use SyncCounter instead.
    Since:
    3.0.0
    Author:
    Bela Ban
    • 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.
        Description copied from interface: BaseCounter
        Returns an AsyncCounter wrapper for this instance. If this counter is already asynchronous, then this counter instance is returned (no-op)
        Specified by:
        async in interface BaseCounter
        Returns:
        The AsyncCounter instance.