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
Modifier and TypeClassDescriptionstatic final class
A builder for Flight servers. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default number of bytes that can be queued on an output stream before blocking. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Block until the server shuts down.boolean
awaitTermination
(long timeout, TimeUnit unit) Wait for the server to shut down with a timeout.static FlightServer.Builder
builder()
Create a builder for a Flight server.static FlightServer.Builder
builder
(BufferAllocator allocator, Location location, FlightProducer producer) Create a builder for a Flight server.void
close()
Shutdown the server, waits for up to 6 seconds for successful shutdown before returning.Get the location for this server.int
getPort()
Get the port the server is running on (if applicable).void
shutdown()
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:
close
in 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.
-