public class FlightServer extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
FlightServer.Builder
A builder for Flight servers.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BACKPRESSURE_THRESHOLD
The default number of bytes that can be queued on an output stream before blocking.
|
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination()
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.
|
Location |
getLocation()
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.
|
FlightServer |
start()
Start the server.
|
public static final int DEFAULT_BACKPRESSURE_THRESHOLD
public FlightServer start() throws IOException
IOException
public int getPort()
public Location getLocation()
public void awaitTermination() throws InterruptedException
InterruptedException
public void shutdown()
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public void close() throws InterruptedException
close
in interface AutoCloseable
InterruptedException
public static FlightServer.Builder builder()
public static FlightServer.Builder builder(BufferAllocator allocator, Location location, FlightProducer producer)
Copyright © 2024 The Apache Software Foundation. All rights reserved.