Interface RIdGeneratorAsync

All Superinterfaces:
RExpirableAsync, RObjectAsync
All Known Subinterfaces:
RIdGenerator
All Known Implementing Classes:
RedissonIdGenerator

public interface RIdGeneratorAsync extends RExpirableAsync
Id generator of Long type numbers. Returns unique numbers but not monotonically increased.
Author:
Nikita Koksharov
  • Method Details

    • tryInitAsync

      RFuture<Boolean> tryInitAsync(long value, long allocationSize)
      Initializes Id generator params.
      Parameters:
      value - - initial value
      allocationSize - - values range allocation size
      Returns:
      true if Id generator initialized false if Id generator already initialized
    • nextIdAsync

      RFuture<Long> nextIdAsync()
      Returns next unique number but not monotonically increased
      Returns:
      number