Class QueryStatusChecker
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.QueryStatusChecker
-
- All Implemented Interfaces:
AutoCloseable
public class QueryStatusChecker extends Object implements AutoCloseable
This class provides a mechanism for callers to terminate in-progress work if the upstream Athena query waiting for that work has already terminated. Callers using the SDK as-is should only need to call #isQueryRunning, as #startQueryStatusChecker should have already been called byMetadataHandler
orRecordHandler
.
-
-
Constructor Summary
Constructors Constructor Description QueryStatusChecker(software.amazon.awssdk.services.athena.AthenaClient athena, ThrottlingInvoker athenaInvoker, String queryId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Stops the status checker threadboolean
isQueryRunning()
Returns whether the query is still running
-
-
-
Constructor Detail
-
QueryStatusChecker
public QueryStatusChecker(software.amazon.awssdk.services.athena.AthenaClient athena, ThrottlingInvoker athenaInvoker, String queryId)
-
-
Method Detail
-
isQueryRunning
public boolean isQueryRunning()
Returns whether the query is still running
-
close
public void close()
Stops the status checker thread- Specified by:
close
in interfaceAutoCloseable
-
-