Package org.apache.arrow.flight.grpc
Class MetadataAdapter
java.lang.Object
org.apache.arrow.flight.grpc.MetadataAdapter
- All Implemented Interfaces:
CallHeaders
A mutable adapter between the gRPC Metadata object and the Flight headers interface.
This allows us to present the headers (metadata) from gRPC without copying to/from our own object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(String key) Check whether the given metadata key is present.Get the value of a metadata key.Get all values present for the given metadata key.Iterable<byte[]>
getAllByte
(String key) Get all values present for the given metadata key.byte[]
Get the value of a metadata key.void
Insert a metadata pair with the given value.void
Insert a metadata pair with the given value.keys()
Get a set of all the metadata keys.toString()
-
Constructor Details
-
MetadataAdapter
public MetadataAdapter(io.grpc.Metadata metadata)
-
-
Method Details
-
get
Description copied from interface:CallHeaders
Get the value of a metadata key. If multiple values are present, then get the last one.- Specified by:
get
in interfaceCallHeaders
-
getByte
Description copied from interface:CallHeaders
Get the value of a metadata key. If multiple values are present, then get the last one.- Specified by:
getByte
in interfaceCallHeaders
-
getAll
Description copied from interface:CallHeaders
Get all values present for the given metadata key.- Specified by:
getAll
in interfaceCallHeaders
-
getAllByte
Description copied from interface:CallHeaders
Get all values present for the given metadata key.- Specified by:
getAllByte
in interfaceCallHeaders
-
insert
Description copied from interface:CallHeaders
Insert a metadata pair with the given value.Duplicate metadata are permitted.
- Specified by:
insert
in interfaceCallHeaders
-
insert
Description copied from interface:CallHeaders
Insert a metadata pair with the given value.Duplicate metadata are permitted.
- Specified by:
insert
in interfaceCallHeaders
-
keys
Description copied from interface:CallHeaders
Get a set of all the metadata keys.- Specified by:
keys
in interfaceCallHeaders
-
containsKey
Description copied from interface:CallHeaders
Check whether the given metadata key is present.- Specified by:
containsKey
in interfaceCallHeaders
-
toString
-