Package biopb.tensor
Class FlightSession
java.lang.Object
biopb.tensor.FlightSession
- All Implemented Interfaces:
AutoCloseable
Owns one Flight connection's allocator, authentication and error boundary.
Every foreground Flight call enters here, so typed server errors are
translated consistently both when an RPC starts and when a streaming action
reports an error while its iterator is consumed. It also builds the TLS
client from a resolved TlsTrust.
-
Constructor Summary
ConstructorsConstructorDescriptionFlightSession(org.apache.arrow.flight.Location location, String token) FlightSession(org.apache.arrow.flight.Location location, String token, TlsTrust trust) Open a session whose TLS trust istrust: its anchor is the only certificate the connection accepts, and its hostname override (when set) is the name matched against the certificate instead of the dialed one. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.arrow.memory.BufferAllocatororg.apache.arrow.flight.grpc.CredentialCallOptionorg.apache.arrow.flight.FlightClientclient()voidclose()Iterator<org.apache.arrow.flight.Result>doAction(org.apache.arrow.flight.Action action) org.apache.arrow.flight.FlightInfogetInfo(org.apache.arrow.flight.FlightDescriptor descriptor) org.apache.arrow.flight.FlightStreamgetStream(org.apache.arrow.flight.Ticket ticket) org.apache.arrow.flight.Locationlocation()static RuntimeExceptionThe typed exception behind a failure surfaced through a future.org.apache.arrow.flight.FlightClient.ClientStreamListenerstartPut(org.apache.arrow.flight.FlightDescriptor descriptor, org.apache.arrow.vector.VectorSchemaRoot root, org.apache.arrow.flight.FlightClient.PutListener listener) Open a DoPut and sendroot's schema; the caller writes the batches and drainslistener.token()trust()
-
Constructor Details
-
FlightSession
-
FlightSession
Open a session whose TLS trust istrust: its anchor is the only certificate the connection accepts, and its hostname override (when set) is the name matched against the certificate instead of the dialed one.TlsTrust.NONEleaves the JDK's default trust store in charge. Meaningful only for agrpc+tls://location.
-
-
Method Details
-
location
public org.apache.arrow.flight.Location location() -
token
-
trust
-
allocator
public org.apache.arrow.memory.BufferAllocator allocator() -
client
public org.apache.arrow.flight.FlightClient client() -
authOption
public org.apache.arrow.flight.grpc.CredentialCallOption authOption() -
getInfo
public org.apache.arrow.flight.FlightInfo getInfo(org.apache.arrow.flight.FlightDescriptor descriptor) -
getStream
public org.apache.arrow.flight.FlightStream getStream(org.apache.arrow.flight.Ticket ticket) -
startPut
public org.apache.arrow.flight.FlightClient.ClientStreamListener startPut(org.apache.arrow.flight.FlightDescriptor descriptor, org.apache.arrow.vector.VectorSchemaRoot root, org.apache.arrow.flight.FlightClient.PutListener listener) Open a DoPut and sendroot's schema; the caller writes the batches and drainslistener. -
mapped
The typed exception behind a failure surfaced through a future.A DoPut reports its error on the listener rather than from the call that started it, so the boundary the other methods here draw has to be reachable from the unwrapped cause as well.
-
doAction
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-