@Internal public class OperationManager extends Object
OperationManager.Operation
.Modifier and Type | Class and Description |
---|---|
class |
OperationManager.Operation
Operation to manage the execution, results and so on.
|
Constructor and Description |
---|
OperationManager(ExecutorService service) |
Modifier and Type | Method and Description |
---|---|
void |
cancelOperation(OperationHandle operationHandle)
Cancel the execution of the operation.
|
void |
close()
Closes the
OperationManager and all operations. |
void |
closeOperation(OperationHandle operationHandle)
Close the operation and release all resources used by the
OperationManager.Operation . |
ResultSet |
fetchResults(OperationHandle operationHandle,
FetchOrientation orientation,
int maxRows) |
ResultSet |
fetchResults(OperationHandle operationHandle,
long token,
int maxRows)
Get the results of the operation.
|
OperationManager.Operation |
getOperation(OperationHandle operationHandle) |
int |
getOperationCount() |
OperationInfo |
getOperationInfo(OperationHandle operationHandle)
Get the
OperationInfo of the operation. |
ResolvedSchema |
getOperationResultSchema(OperationHandle operationHandle)
Get the
ResolvedSchema of the operation. |
OperationHandle |
submitOperation(Callable<ResultSet> executor)
Submit the operation to the
OperationManager . |
OperationHandle |
submitOperation(java.util.function.Function<OperationHandle,ResultFetcher> fetcherSupplier)
Submit the operation to the
OperationManager . |
public OperationManager(ExecutorService service)
public OperationHandle submitOperation(Callable<ResultSet> executor)
OperationManager
. The OperationManager
manages
the lifecycle of the OperationManager.Operation
, including register resources, fire the execution and
so on.executor
- Worker to execute.public OperationHandle submitOperation(java.util.function.Function<OperationHandle,ResultFetcher> fetcherSupplier)
OperationManager
. The OperationManager
manges the
lifecycle of the OperationManager.Operation
, including register resources, fire the execution and so
on.fetcherSupplier
- offer the fetcher to get the results.public void cancelOperation(OperationHandle operationHandle)
operationHandle
- identifies the OperationManager.Operation
.public void closeOperation(OperationHandle operationHandle)
OperationManager.Operation
.operationHandle
- identifies the OperationManager.Operation
.public OperationInfo getOperationInfo(OperationHandle operationHandle)
OperationInfo
of the operation.operationHandle
- identifies the OperationManager.Operation
.public ResolvedSchema getOperationResultSchema(OperationHandle operationHandle) throws Exception
ResolvedSchema
of the operation.operationHandle
- identifies the OperationManager.Operation
.Exception
public ResultSet fetchResults(OperationHandle operationHandle, long token, int maxRows)
operationHandle
- identifies the OperationManager.Operation
.token
- identifies which batch of data to fetch.maxRows
- the maximum number of rows to fetch.public ResultSet fetchResults(OperationHandle operationHandle, FetchOrientation orientation, int maxRows)
public void close()
OperationManager
and all operations.@VisibleForTesting public int getOperationCount()
@VisibleForTesting public OperationManager.Operation getOperation(OperationHandle operationHandle)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.