Interface Context<K,V>

Type Parameters:
K - the key type
V - the value type

public interface Context<K,V>
A context for managing references to server-side state.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value associated with the specified key from this context, creating it from the specified factory, if necessary.
  • Method Details

    • computeIfAbsent

      V computeIfAbsent(K key, BiFunction<K,Runnable,V> factory)
      Returns the value associated with the specified key from this context, creating it from the specified factory, if necessary.
      Parameters:
      key - a key by which the value may be referenced
      factory - a factory for creating the value if it does not already exist within this context.
      Returns:
      the value, obtained from this context, or generated from the specified factory.