Class UserIdUtil

java.lang.Object
com.symphony.bdk.core.util.UserIdUtil

@API(status=STABLE) public class UserIdUtil extends Object
Used to extract the tenant ID from a user ID.

The user ID is a combination of a unique tenant ID, and a unique sub-tenant ID, combined into a long. The tenant ID is stored in the 27 highest bits (minus the sign bit which is unused so that all IDs remain a positive value) which allows for 134 million pods. This leaves 36 lowest bits for the user ID, which allows 68.7 billion users per tenant.

  • Method Details

    • extractTenantId

      public static int extractTenantId(long userId)
      Extracts the tenant ID from a user ID.
      Parameters:
      userId - the user ID.
      Returns:
      the tenant ID.