Class FlightExportTicketHelper

java.lang.Object
io.deephaven.proto.flight.util.FlightExportTicketHelper

public class FlightExportTicketHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    descriptorToExportId(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId)
    Convenience method to convert from Flight.FlightDescriptor to export id.
    static org.apache.arrow.flight.impl.Flight.Ticket
    descriptorToFlightTicket(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId)
    Convenience method to convert from a Flight.Descriptor to a Flight.Ticket.
    static Ticket
    descriptorToTicket(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId)
    Convenience method to convert from a Flight.Descriptor to a Flight.Ticket.
    static org.apache.arrow.flight.impl.Flight.FlightDescriptor
    exportIdToDescriptor(int exportId)
    Convenience method to convert from export id to Flight.FlightDescriptor.
    static org.apache.arrow.flight.impl.Flight.Ticket
    exportIdToFlightTicket(int exportId)
    Convenience method to convert from export id to Flight.Ticket.
    static org.apache.arrow.flight.impl.Flight.FlightDescriptor
    Convenience method to convert from a Flight.Ticket to a Flight.FlightDescriptor.
    static org.apache.arrow.flight.impl.Flight.FlightDescriptor
    ticketToDescriptor(org.apache.arrow.flight.impl.Flight.Ticket ticket, String logId)
    Convenience method to convert from a Flight.Ticket to a Flight.FlightDescriptor.
    static int
    ticketToExportId(org.apache.arrow.flight.impl.Flight.Ticket ticket, String logId)
    Convenience method to convert from Flight.Ticket to export id.

    Methods inherited from class java.lang.Object

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

    • FlightExportTicketHelper

      public FlightExportTicketHelper()
  • Method Details

    • exportIdToFlightTicket

      public static org.apache.arrow.flight.impl.Flight.Ticket exportIdToFlightTicket(int exportId)
      Convenience method to convert from export id to Flight.Ticket.
      Parameters:
      exportId - the export id
      Returns:
      a grpc Ticket wrapping the export id
    • exportIdToDescriptor

      public static org.apache.arrow.flight.impl.Flight.FlightDescriptor exportIdToDescriptor(int exportId)
      Convenience method to convert from export id to Flight.FlightDescriptor.
      Parameters:
      exportId - the export id
      Returns:
      a grpc Ticket wrapping the export id
    • ticketToExportId

      public static int ticketToExportId(org.apache.arrow.flight.impl.Flight.Ticket ticket, String logId)
      Convenience method to convert from Flight.Ticket to export id.

      Ticket's byte[0] must be ExportTicketHelper.TICKET_PREFIX, bytes[1-4] are a signed int export id in little-endian.

      Parameters:
      ticket - the grpc Ticket
      logId - an end-user friendly identification of the ticket should an error occur
      Returns:
      the export id that the Ticket wraps
    • descriptorToExportId

      public static int descriptorToExportId(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId)
      Convenience method to convert from Flight.FlightDescriptor to export id.

      Descriptor must be a path.

      Parameters:
      descriptor - the grpc Ticket
      logId - an end-user friendly identification of the ticket should an error occur
      Returns:
      the export id that the Ticket wraps
    • ticketToDescriptor

      public static org.apache.arrow.flight.impl.Flight.FlightDescriptor ticketToDescriptor(Ticket ticket, String logId)
      Convenience method to convert from a Flight.Ticket to a Flight.FlightDescriptor.
      Parameters:
      ticket - the ticket to convert
      logId - an end-user friendly identification of the ticket should an error occur
      Returns:
      a flight descriptor that represents the ticket
    • ticketToDescriptor

      public static org.apache.arrow.flight.impl.Flight.FlightDescriptor ticketToDescriptor(org.apache.arrow.flight.impl.Flight.Ticket ticket, String logId)
      Convenience method to convert from a Flight.Ticket to a Flight.FlightDescriptor.
      Parameters:
      ticket - the ticket to convert
      logId - an end-user friendly identification of the ticket should an error occur
      Returns:
      a flight descriptor that represents the ticket
    • descriptorToFlightTicket

      public static org.apache.arrow.flight.impl.Flight.Ticket descriptorToFlightTicket(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId)
      Convenience method to convert from a Flight.Descriptor to a Flight.Ticket.
      Parameters:
      descriptor - the descriptor to convert
      logId - an end-user friendly identification of the ticket should an error occur
      Returns:
      a flight ticket that represents the descriptor
    • descriptorToTicket

      public static Ticket descriptorToTicket(org.apache.arrow.flight.impl.Flight.FlightDescriptor descriptor, String logId)
      Convenience method to convert from a Flight.Descriptor to a Flight.Ticket.
      Parameters:
      descriptor - the descriptor to convert
      logId - an end-user friendly identification of the ticket should an error occur
      Returns:
      a flight ticket that represents the descriptor