public static final class Query.Timeout extends java.lang.Object implements Query.Controller
The timeout applies to the entire duration of fetching results, not just the time spent between individual fetches. A caller which is slowly processing results can timeout. More sophisticated timeouts can be implemented using custom Controller implementations.
| Constructor and Description | 
|---|
Query.Timeout(long timeout,
             java.util.concurrent.TimeUnit unit)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
begin()
Called by query when it begins, possibly multiple times. 
 | 
void | 
close()
Always called by query when finished, even when it fails. 
 | 
void | 
continueCheck()
Periodically called by query to determine if it should continue. 
 | 
long | 
getTimeout()
Returns a non-negative value if controller imposes an absolute upper
 bound on query execution time. 
 | 
java.util.concurrent.TimeUnit | 
getTimeoutUnit()
Returns the unit for the timeout, if applicable. 
 | 
static Query.Timeout | 
hours(long timeout)
Return a new Timeout in hours. 
 | 
static Query.Timeout | 
micros(long timeout)
Return a new Timeout in microseconds. 
 | 
static Query.Timeout | 
millis(long timeout)
Return a new Timeout in milliseconds. 
 | 
static Query.Timeout | 
minutes(long timeout)
Return a new Timeout in minutes. 
 | 
static Query.Timeout | 
nanos(long timeout)
Return a new Timeout in nanoseconds. 
 | 
static Query.Timeout | 
seconds(long timeout)
Return a new Timeout in seconds. 
 | 
java.lang.String | 
toString()  | 
public Query.Timeout(long timeout,
             java.util.concurrent.TimeUnit unit)
public static Query.Timeout nanos(long timeout)
public static Query.Timeout micros(long timeout)
public static Query.Timeout millis(long timeout)
public static Query.Timeout seconds(long timeout)
public static Query.Timeout minutes(long timeout)
public static Query.Timeout hours(long timeout)
public long getTimeout()
Query.ControllergetTimeout in interface Query.Controllerpublic java.util.concurrent.TimeUnit getTimeoutUnit()
Query.ControllergetTimeoutUnit in interface Query.Controllerpublic void begin()
Query.Controllerbegin in interface Query.Controllerpublic void continueCheck()
                   throws FetchTimeoutException
Query.ControllercontinueCheck in interface Query.ControllerFetchTimeoutExceptionpublic void close()
Query.Controllerclose in interface Query.Controllerclose in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.