Interface UUIDService

All Known Implementing Classes:
CacheUUIDService, OfflineModeUUIDService

public interface UUIDService
Service used to provide usernames from player UUIDs
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Check whether or not this service can be safely used synchronously without blocking the server for an extended amount of time.
    default @NonNull Collection<@NonNull UUIDMapping>
    Get as many UUID mappings as possible under the condition that the operation cannot be blocking (for an extended amount of time)
    default @Nullable UUIDMapping
    getImmediately​(@NonNull Object object)
    Get a single UUID mapping immediately, if possible
    @NonNull List<@NonNull UUIDMapping>
    getNames​(@NonNull List<@NonNull UUID> uuids)
    Attempt to complete the given requests.
    @NonNull List<@NonNull UUIDMapping>
    getUUIDs​(@NonNull List<@NonNull String> usernames)
    Attempt to complete the given requests.
  • Method Details

    • getNames

      @NonNull List<@NonNull UUIDMapping> getNames(@NonNull List<@NonNull UUID> uuids)
      Attempt to complete the given requests. Returns the mappings that could be created by this server
      Parameters:
      uuids - Requests
      Returns:
      Completed requests
    • getUUIDs

      @NonNull List<@NonNull UUIDMapping> getUUIDs(@NonNull List<@NonNull String> usernames)
      Attempt to complete the given requests. Returns the mappings that could be created by this server
      Parameters:
      usernames - Requests
      Returns:
      Completed requests
    • getImmediately

      default @NonNull Collection<@NonNull UUIDMapping> getImmediately()
      Get as many UUID mappings as possible under the condition that the operation cannot be blocking (for an extended amount of time)
      Returns:
      All mappings that could be provided immediately
    • canBeSynchronous

      default boolean canBeSynchronous()
      Check whether or not this service can be safely used synchronously without blocking the server for an extended amount of time.
      Returns:
      True if the service can be used synchronously
    • getImmediately

      default @Nullable UUIDMapping getImmediately(@NonNull Object object)
      Get a single UUID mapping immediately, if possible
      Parameters:
      object - Username (String) or UUID
      Returns:
      Mapping, if it could be found immediately