public class FlightSqlScenarioProducer extends Object implements FlightSqlProducer
FlightSqlProducer.Schemas
FlightProducer.CallContext, FlightProducer.ServerStreamListener, FlightProducer.StreamListener<T>
Constructor and Description |
---|
FlightSqlScenarioProducer(BufferAllocator allocator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
acceptPut, cancelFlightInfo, doAction, getFlightInfo, getSchema, getStream, listActions, renewFlightEndpoint
doExchange, pollFlightInfo
public FlightSqlScenarioProducer(BufferAllocator allocator)
public void beginSavepoint(FlightSql.ActionBeginSavepointRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionBeginSavepointResult> listener)
FlightSqlProducer
beginSavepoint
in interface FlightSqlProducer
request
- The savepoint request.context
- Per-call context.listener
- The newly created savepoint ID.public void beginTransaction(FlightSql.ActionBeginTransactionRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionBeginTransactionResult> listener)
FlightSqlProducer
beginTransaction
in interface FlightSqlProducer
request
- The transaction request.context
- Per-call context.listener
- The newly created transaction ID.public void cancelQuery(FlightInfo info, FlightProducer.CallContext context, FlightProducer.StreamListener<CancelResult> listener)
FlightSqlProducer
cancelQuery
in interface FlightSqlProducer
info
- The FlightInfo of the query to cancel.context
- Per-call context.listener
- Whether cancellation succeeded.public void createPreparedStatement(FlightSql.ActionCreatePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener)
FlightSqlProducer
FlightSql.ActionCreatePreparedStatementResult
object in a Result
object.createPreparedStatement
in interface FlightSqlProducer
request
- The sql command to generate the prepared statement.context
- Per-call context.listener
- A stream of responses.public void createPreparedSubstraitPlan(FlightSql.ActionCreatePreparedSubstraitPlanRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<FlightSql.ActionCreatePreparedStatementResult> listener)
FlightSqlProducer
createPreparedSubstraitPlan
in interface FlightSqlProducer
request
- The plan.context
- Per-call context.listener
- The resulting prepared statement.public void closePreparedStatement(FlightSql.ActionClosePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener)
FlightSqlProducer
closePreparedStatement
in interface FlightSqlProducer
request
- The sql command to generate the prepared statement.context
- Per-call context.listener
- A stream of responses.public void endSavepoint(FlightSql.ActionEndSavepointRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener)
FlightSqlProducer
endSavepoint
in interface FlightSqlProducer
request
- The savepoint, and whether to release/rollback.context
- Per-call context.listener
- Call StreamListener#onCompleted()
or
StreamListener#onError(Throwable)
when done; do not send a result.public void endTransaction(FlightSql.ActionEndTransactionRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener)
FlightSqlProducer
endTransaction
in interface FlightSqlProducer
request
- The transaction, and whether to release/rollback.context
- Per-call context.listener
- Call StreamListener#onCompleted()
or
StreamListener#onError(Throwable)
when done; do not send a result.public FlightInfo getFlightInfoStatement(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
getFlightInfoStatement
in interface FlightSqlProducer
command
- The SQL query.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public FlightInfo getFlightInfoSubstraitPlan(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
getFlightInfoSubstraitPlan
in interface FlightSqlProducer
command
- The Substrait plan.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public FlightInfo getFlightInfoPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
getFlightInfoPreparedStatement
in interface FlightSqlProducer
command
- The prepared statement to generate the data stream.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public SchemaResult getSchemaStatement(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
getSchemaStatement
in interface FlightSqlProducer
command
- The SQL query.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public SchemaResult getSchemaPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
getSchemaPreparedStatement
in interface FlightSqlProducer
command
- The prepared statement handle.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public SchemaResult getSchemaSubstraitPlan(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
getSchemaSubstraitPlan
in interface FlightSqlProducer
command
- The Substrait plan.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamStatement(FlightSql.TicketStatementQuery ticket, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamStatement
in interface FlightSqlProducer
ticket
- Ticket message containing the statement handle.context
- Per-call context.listener
- An interface for sending data back to the client.public void getStreamPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamPreparedStatement
in interface FlightSqlProducer
command
- The prepared statement to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public Runnable acceptPutStatement(FlightSql.CommandStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream)
FlightSqlProducer
`PutResult`s must be in the form of a FlightSql.DoPutUpdateResult
.
acceptPutStatement
in interface FlightSqlProducer
command
- The sql command to generate the data stream.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.public Runnable acceptPutSubstraitPlan(FlightSql.CommandStatementSubstraitPlan command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream)
FlightSqlProducer
acceptPutSubstraitPlan
in interface FlightSqlProducer
command
- The Substrait plan to evaluate.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.public Runnable acceptPutPreparedStatementUpdate(FlightSql.CommandPreparedStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream)
FlightSqlProducer
`PutResult`s must be in the form of a FlightSql.DoPutUpdateResult
.
acceptPutPreparedStatementUpdate
in interface FlightSqlProducer
command
- The prepared statement to generate the data stream.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.public Runnable acceptPutPreparedStatementQuery(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream)
FlightSqlProducer
acceptPutPreparedStatementQuery
in interface FlightSqlProducer
command
- The prepared statement the parameter values will bind to.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.public FlightInfo getFlightInfoSqlInfo(FlightSql.CommandGetSqlInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetSqlInfo
in a Result
.getFlightInfoSqlInfo
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamSqlInfo(FlightSql.CommandGetSqlInfo command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamSqlInfo
in interface FlightSqlProducer
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public void getStreamTypeInfo(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamTypeInfo
in interface FlightSqlProducer
context
- Per-call context.listener
- An interface for sending data back to the client.public FlightInfo getFlightInfoTypeInfo(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
getFlightInfoTypeInfo
in interface FlightSqlProducer
request
- request filter parameters.descriptor
- The descriptor identifying the data stream.public FlightInfo getFlightInfoCatalogs(FlightSql.CommandGetCatalogs request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetCatalogs
objects in Result
objects.getFlightInfoCatalogs
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamCatalogs(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamCatalogs
in interface FlightSqlProducer
context
- Per-call context.listener
- An interface for sending data back to the client.public FlightInfo getFlightInfoSchemas(FlightSql.CommandGetDbSchemas request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetDbSchemas
objects in Result
objects.getFlightInfoSchemas
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamSchemas(FlightSql.CommandGetDbSchemas command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamSchemas
in interface FlightSqlProducer
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public FlightInfo getFlightInfoTables(FlightSql.CommandGetTables request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetTables
objects in Result
objects.getFlightInfoTables
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamTables(FlightSql.CommandGetTables command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamTables
in interface FlightSqlProducer
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public FlightInfo getFlightInfoTableTypes(FlightSql.CommandGetTableTypes request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetTableTypes
objects in Result
objects.getFlightInfoTableTypes
in interface FlightSqlProducer
context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamTableTypes(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamTableTypes
in interface FlightSqlProducer
context
- Per-call context.listener
- An interface for sending data back to the client.public FlightInfo getFlightInfoPrimaryKeys(FlightSql.CommandGetPrimaryKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetPrimaryKeys
objects in Result
objects.getFlightInfoPrimaryKeys
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamPrimaryKeys(FlightSql.CommandGetPrimaryKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamPrimaryKeys
in interface FlightSqlProducer
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public FlightInfo getFlightInfoExportedKeys(FlightSql.CommandGetExportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetExportedKeys
objects in Result
objects.getFlightInfoExportedKeys
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public FlightInfo getFlightInfoImportedKeys(FlightSql.CommandGetImportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetImportedKeys
objects in Result
objects.getFlightInfoImportedKeys
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public FlightInfo getFlightInfoCrossReference(FlightSql.CommandGetCrossReference request, FlightProducer.CallContext context, FlightDescriptor descriptor)
FlightSqlProducer
FlightSql.CommandGetCrossReference
objects in Result
objects.getFlightInfoCrossReference
in interface FlightSqlProducer
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.public void getStreamExportedKeys(FlightSql.CommandGetExportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamExportedKeys
in interface FlightSqlProducer
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public void getStreamImportedKeys(FlightSql.CommandGetImportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamImportedKeys
in interface FlightSqlProducer
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public void getStreamCrossReference(FlightSql.CommandGetCrossReference command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener)
FlightSqlProducer
getStreamCrossReference
in interface FlightSqlProducer
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.public void close() throws Exception
close
in interface AutoCloseable
Exception
public void listFlights(FlightProducer.CallContext context, Criteria criteria, FlightProducer.StreamListener<FlightInfo> listener)
FlightProducer
listFlights
in interface FlightProducer
context
- Per-call context.criteria
- Application-defined criteria for filtering streams.listener
- An interface for sending data back to the client.Copyright © 2023 The Apache Software Foundation. All rights reserved.