Interface UserData

All Known Implementing Classes:
UserDataImpl

public interface UserData
Mutable user data associated with a connection. Implementations must be thread-safe.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    <VALUE> VALUE
    get(UserData.TypedKey<VALUE> key)
     
    <VALUE> VALUE
    put(UserData.TypedKey<VALUE> key, VALUE value)
    Associates the specified value with the specified key.
    <VALUE> VALUE
     
    int
     
  • Method Details

    • get

      <VALUE> VALUE get(UserData.TypedKey<VALUE> key)
      Type Parameters:
      VALUE -
      Parameters:
      key -
      Returns:
      the value or null if no mapping is found
    • put

      <VALUE> VALUE put(UserData.TypedKey<VALUE> key, VALUE value)
      Associates the specified value with the specified key. An old value is replaced by the specified value.
      Parameters:
      key -
      value -
      Returns:
      the previous value associated with key, or null if no mapping exists
    • remove

      <VALUE> VALUE remove(UserData.TypedKey<VALUE> key)
      Type Parameters:
      VALUE -
      Parameters:
      key -
    • size

      int size()
    • clear

      void clear()