public class PollInfo extends Object
Constructor and Description |
---|
PollInfo(FlightInfo flightInfo,
FlightDescriptor flightDescriptor,
Double progress,
Instant expirationTime)
Create a new PollInfo.
|
Modifier and Type | Method and Description |
---|---|
static PollInfo |
deserialize(ByteBuffer serialized) |
boolean |
equals(Object o) |
Optional<Instant> |
getExpirationTime()
The expiration time of the query execution.
|
Optional<FlightDescriptor> |
getFlightDescriptor()
The FlightDescriptor that should be used to get further updates on this query.
|
FlightInfo |
getFlightInfo()
The FlightInfo describing the result set of the execution of a query.
|
Optional<Double> |
getProgress()
The progress of the query.
|
int |
hashCode() |
ByteBuffer |
serialize() |
String |
toString() |
public PollInfo(FlightInfo flightInfo, FlightDescriptor flightDescriptor, Double progress, Instant expirationTime)
flightInfo
- The FlightInfo (must not be null).flightDescriptor
- The descriptor used to poll for more information; null if and only if query is finished.progress
- Optional progress info in [0.0, 1.0].expirationTime
- An expiration time, after which the server may no longer recognize the descriptor.public FlightInfo getFlightInfo()
This is always present and always contains all endpoints for the query execution so far,
not just new endpoints that completed execution since the last call to
FlightClient.pollInfo(FlightDescriptor, CallOption...)
.
public Optional<FlightDescriptor> getFlightDescriptor()
It is present if and only if the query is still running. If present, it should be passed to
FlightClient.pollInfo(FlightDescriptor, CallOption...)
to get an update.
public Optional<Double> getProgress()
If present, should be a value in [0.0, 1.0]. It is not necessarily monotonic or non-decreasing.
public Optional<Instant> getExpirationTime()
After this passes, the server may not recognize the descriptor anymore and the client will not be able to track the query anymore.
public ByteBuffer serialize()
public static PollInfo deserialize(ByteBuffer serialized) throws IOException, URISyntaxException
IOException
URISyntaxException
Copyright © 2024 The Apache Software Foundation. All rights reserved.