Class RequestContextAdapter

java.lang.Object
org.apache.arrow.flight.grpc.RequestContextAdapter
All Implemented Interfaces:
RequestContext

public class RequestContextAdapter extends Object implements RequestContext
Adapter for holding key value pairs.
  • Field Details

    • REQUEST_CONTEXT_KEY

      public static final io.grpc.Context.Key<RequestContext> REQUEST_CONTEXT_KEY
  • Constructor Details

    • RequestContextAdapter

      public RequestContextAdapter()
  • Method Details

    • put

      public void put(String key, String value)
      Description copied from interface: RequestContext
      Register a variable and a value.
      Specified by:
      put in interface RequestContext
      Parameters:
      key - the variable name.
      value - the value.
    • get

      public String get(String key)
      Description copied from interface: RequestContext
      Retrieve a registered variable.
      Specified by:
      get in interface RequestContext
      Parameters:
      key - the variable name.
      Returns:
      the value, or null if not found.
    • keySet

      public Set<String> keySet()
      Description copied from interface: RequestContext
      Retrieves the keys that have been registered to this context.
      Specified by:
      keySet in interface RequestContext
      Returns:
      the keys used in this context.
    • remove

      public String remove(String key)
      Description copied from interface: RequestContext
      Deletes a registered variable.
      Specified by:
      remove in interface RequestContext
      Returns:
      the value associated with the deleted variable, or null if the key doesn't exist.