java.lang.Object
org.apache.arrow.flight.FlightServer
- All Implemented Interfaces:
AutoCloseable
Generic server of flight data that is customized via construction with delegate classes for the
actual logic. The server currently uses GRPC as its transport mechanism.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder for Flight servers. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default number of bytes that can be queued on an output stream before blocking. -
Method Summary
Modifier and TypeMethodDescriptionvoidBlock until the server shuts down.booleanawaitTermination(long timeout, TimeUnit unit) Wait for the server to shut down with a timeout.static FlightServer.Builderbuilder()Create a builder for a Flight server.static FlightServer.Builderbuilder(BufferAllocator allocator, Location location, FlightProducer producer) Create a builder for a Flight server.voidclose()Shutdown the server, waits for up to 6 seconds for successful shutdown before returning.Get the location for this server.intgetPort()Get the port the server is running on (if applicable).voidshutdown()Request that the server shut down.start()Start the server.
-
Field Details
-
DEFAULT_BACKPRESSURE_THRESHOLD
public static final int DEFAULT_BACKPRESSURE_THRESHOLDThe default number of bytes that can be queued on an output stream before blocking.- See Also:
-
-
Method Details
-
start
Start the server.- Throws:
IOException
-
getPort
public int getPort()Get the port the server is running on (if applicable). -
getLocation
Get the location for this server. -
awaitTermination
Block until the server shuts down.- Throws:
InterruptedException
-
shutdown
public void shutdown()Request that the server shut down. -
awaitTermination
Wait for the server to shut down with a timeout.- Returns:
- true if the server shut down successfully.
- Throws:
InterruptedException
-
close
Shutdown the server, waits for up to 6 seconds for successful shutdown before returning.- Specified by:
closein interfaceAutoCloseable- Throws:
InterruptedException
-
builder
Create a builder for a Flight server. -
builder
public static FlightServer.Builder builder(BufferAllocator allocator, Location location, FlightProducer producer) Create a builder for a Flight server.
-