Package org.teiid.translator
Class DataNotAvailableException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.teiid.core.TeiidRuntimeException
-
- org.teiid.translator.DataNotAvailableException
-
- All Implemented Interfaces:
Serializable
public class DataNotAvailableException extends TeiidRuntimeException
Used by asynch connectors to indicate data is not available and results should be polled for after the given delay in milliseconds or until a Date is reached.
Note that delays are not guaranteed unlessstrict
is set to true. Withstrict
false, the delay is the maximum amount of time before the plan will be re-queued for execution. There are several scenarios that would cause the delay to be shorter, such as multiple sources where one source returns a shorter delay or if the engine believes more work is to be done before allowing the plan to sit idle.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DataNotAvailableException
NO_POLLING
Indicate that the engine should not poll for results and will be notified via theExecutionContext.dataAvailable()
method.-
Fields inherited from class org.teiid.core.TeiidRuntimeException
CAUSED_BY_STRING
-
-
Constructor Summary
Constructors Constructor Description DataNotAvailableException()
Uses a delay of 0, which implies an immediate poll for results.DataNotAvailableException(long retryDelay)
Uses the given retryDelay.DataNotAvailableException(Date waitUntil)
Instructs the engine to wait until the Date is met before getting results.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getRetryDelay()
Date
getWaitUntil()
boolean
isStrict()
If the delay or Date is strictly enforced then the execution will not asked for results until after that time or untilExecutionContext.dataAvailable()
is called.void
setStrict(boolean strict)
-
Methods inherited from class org.teiid.core.TeiidRuntimeException
getCode, getMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
NO_POLLING
public static final DataNotAvailableException NO_POLLING
Indicate that the engine should not poll for results and will be notified via theExecutionContext.dataAvailable()
method. However the engine may still ask for results before the dataAvailable is called.
-
-
Constructor Detail
-
DataNotAvailableException
public DataNotAvailableException()
Uses a delay of 0, which implies an immediate poll for results.
-
DataNotAvailableException
public DataNotAvailableException(long retryDelay)
Uses the given retryDelay. Negative values indicate that the engine should not poll for results (see alsoNO_POLLING
and will be notified via theExecutionContext.dataAvailable()
method.- Parameters:
retryDelay
- in milliseconds
-
DataNotAvailableException
public DataNotAvailableException(Date waitUntil)
Instructs the engine to wait until the Date is met before getting results. By default this will be strictly enforced, meaning that no attempt will be made to get results before the given Date.- Parameters:
waitUntil
-
-
-
Method Detail
-
getRetryDelay
public long getRetryDelay()
-
getWaitUntil
public Date getWaitUntil()
-
isStrict
public boolean isStrict()
If the delay or Date is strictly enforced then the execution will not asked for results until after that time or untilExecutionContext.dataAvailable()
is called.- Returns:
-
setStrict
public void setStrict(boolean strict)
-
-