Package biopb.tensor

Class FlightSession

java.lang.Object
biopb.tensor.FlightSession
All Implemented Interfaces:
AutoCloseable

public final class FlightSession extends Object implements 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. TLS construction joins this class in the next migration slice; its ownership boundary is established now.

  • Constructor Summary

    Constructors
    Constructor
    Description
    FlightSession(org.apache.arrow.flight.Location location, String token)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.arrow.memory.BufferAllocator
     
    org.apache.arrow.flight.grpc.CredentialCallOption
     
    org.apache.arrow.flight.FlightClient
     
    void
     
    Iterator<org.apache.arrow.flight.Result>
    doAction(org.apache.arrow.flight.Action action)
     
    org.apache.arrow.flight.FlightInfo
    getInfo(org.apache.arrow.flight.FlightDescriptor descriptor)
     
    org.apache.arrow.flight.FlightStream
    getStream(org.apache.arrow.flight.Ticket ticket)
     
    org.apache.arrow.flight.Location
     
    The typed exception behind a failure surfaced through a future.
    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 send root's schema; the caller writes the batches and drains listener.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlightSession

      public FlightSession(org.apache.arrow.flight.Location location, String token)
  • Method Details

    • location

      public org.apache.arrow.flight.Location location()
    • token

      public String token()
    • 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 send root's schema; the caller writes the batches and drains listener.
    • mapped

      public static RuntimeException mapped(Throwable cause)
      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

      public Iterator<org.apache.arrow.flight.Result> doAction(org.apache.arrow.flight.Action action)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable