java.lang.Object
org.apache.arrow.flight.FlightInfo
A POJO representation of a FlightInfo, metadata associated with a set of data records.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionFlightInfo
(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records) Constructs a new instance.FlightInfo
(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, boolean ordered, IpcOption option) Constructs a new instance.FlightInfo
(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, boolean ordered, IpcOption option, byte[] appMetadata) Constructs a new instance.FlightInfo
(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, IpcOption option) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic FlightInfo.Builder
builder
(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints) Create a builder for FlightInfo.static FlightInfo
deserialize
(ByteBuffer serialized) Parse the serialized form of this protocol message.boolean
byte[]
long
getBytes()
boolean
long
Deprecated.Deprecated.int
hashCode()
Get the serialized form of this protocol message.toString()
-
Constructor Details
-
FlightInfo
public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records) Constructs a new instance.- Parameters:
schema
- The schema of the Flightdescriptor
- An identifier for the Flight.endpoints
- A list of endpoints that have the flight available.bytes
- The number of bytes in the flightrecords
- The number of records in the flight.
-
FlightInfo
public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, IpcOption option) Constructs a new instance.- Parameters:
schema
- The schema of the Flightdescriptor
- An identifier for the Flight.endpoints
- A list of endpoints that have the flight available.bytes
- The number of bytes in the flightrecords
- The number of records in the flight.option
- IPC write options.
-
FlightInfo
public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, boolean ordered, IpcOption option) Constructs a new instance.- Parameters:
schema
- The schema of the Flightdescriptor
- An identifier for the Flight.endpoints
- A list of endpoints that have the flight available.bytes
- The number of bytes in the flightrecords
- The number of records in the flight.ordered
- Whether the endpoints in this flight are ordered.option
- IPC write options.
-
FlightInfo
public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, boolean ordered, IpcOption option, byte[] appMetadata) Constructs a new instance.- Parameters:
schema
- The schema of the Flightdescriptor
- An identifier for the Flight.endpoints
- A list of endpoints that have the flight available.bytes
- The number of bytes in the flightrecords
- The number of records in the flight.ordered
- Whether the endpoints in this flight are ordered.option
- IPC write options.appMetadata
- Metadata to send along with the flight
-
-
Method Details
-
getSchemaOptional
-
getSchema
Deprecated.Deprecated. UsegetSchemaOptional()
instead.Returns the schema, or an empty schema if no schema is present. -
getBytes
public long getBytes() -
getRecords
public long getRecords() -
getDescriptor
-
getEndpoints
-
getOrdered
public boolean getOrdered() -
getAppMetadata
public byte[] getAppMetadata() -
serialize
Get the serialized form of this protocol message.Intended to help interoperability by allowing non-Flight services to still return Flight types.
-
deserialize
Parse the serialized form of this protocol message.Intended to help interoperability by allowing Flight clients to obtain stream info from non-Flight services.
- Parameters:
serialized
- The serialized form of the FlightInfo, as returned byserialize()
.- Returns:
- The deserialized FlightInfo.
- Throws:
IOException
- if the serialized form is invalid.URISyntaxException
- if the serialized form contains an unsupported URI format.
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
public static FlightInfo.Builder builder(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints) Create a builder for FlightInfo.- Parameters:
schema
- The schema of the Flightdescriptor
- An identifier for the Flight.endpoints
- A list of endpoints that have the flight available.
-