|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectstreamcruncher.api.QueryConfig
public abstract class QueryConfig
Each registered Query has a configuration object that can be retrieved after parsing or at any time during the life of the Query from the API provided.
A handle to the instance must not be serialized and stored through a restart, but must be retrieved afresh after the Kernel restarts. Any changes made to the configuration will take effect immediately. This class is Thread-safe. All values have defaults.
| Nested Class Summary | |
|---|---|
static class |
QueryConfig.QuerySchedulePolicy
|
static class |
QueryConfig.QuerySchedulePolicyValue
|
| Field Summary | |
|---|---|
static int |
defaultAllowedPendingEvents
2147483647 |
static float |
defaultEventWeight
1.0f |
static long |
defaultForceScheduleMarginMsecs
250L |
static long |
defaultResumeCheckTimeMsecs
5000L |
static QueryConfig.QuerySchedulePolicy |
defaultSchPolicy
|
static long |
defaultSchTimeMillis
1500L |
static long |
defaultStuckJobIntTimeMsecs
45000L |
| Method Summary | |
|---|---|
int |
getAllowedPendingEvents(java.lang.String key)
|
java.util.Set<java.lang.String> |
getAllowedPendingEventsKeys()
|
long |
getForceScheduleMarginMsecs()
|
java.util.Set<java.lang.String> |
getKeys()
|
int |
getQueryErrorCount()
|
long |
getQueryLastRanAt()
|
int |
getQueryRunCount()
|
QueryConfig.QuerySchedulePolicyValue |
getQuerySchedulePolicy()
|
long |
getResumeCheckTimeMsecs()
|
long |
getStuckJobInterruptionTimeMsecs()
|
float |
getUnprocessedEventWeight(java.lang.String key)
|
java.util.Set<java.lang.String> |
getUnprocessedEventWeightKeys()
|
boolean |
isQueryPaused()
|
void |
pauseQuery()
|
void |
resumeQuery()
|
void |
setAllowedPendingEvents(java.lang.String key,
int events)
|
void |
setForceScheduleMarginMsecs(long forceScheduleMarginMsecs)
The duration in milliseconds below which a forced schedule will not occur, even if the event-weights have crossed 1.0 if the
time left before a natural/periodic schedule occurs is less than or equal
to this margin. |
void |
setQuerySchedulePolicy(QueryConfig.QuerySchedulePolicyValue policyValue)
Set the Query's scheduling policy. |
void |
setResumeCheckTimeMsecs(long resumeCheckTimeMsecs)
The duration in milliseconds after which the Query wakes up to check if it has been resumed. |
void |
setStuckJobInterruptionTimeMsecs(long stuckJobInterruptionTimeMsecs)
Some parts of the Query processing are multi-threaded. |
void |
setUnprocessedEventWeight(java.lang.String key,
float weight)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final QueryConfig.QuerySchedulePolicy defaultSchPolicy
public static final long defaultSchTimeMillis
public static final float defaultEventWeight
public static final int defaultAllowedPendingEvents
public static final long defaultForceScheduleMarginMsecs
public static final long defaultResumeCheckTimeMsecs
public static final long defaultStuckJobIntTimeMsecs
| Method Detail |
|---|
public long getQueryLastRanAt()
public int getQueryErrorCount()
public int getQueryRunCount()
public java.util.Set<java.lang.String> getKeys()
public QueryConfig.QuerySchedulePolicyValue getQuerySchedulePolicy()
public void setQuerySchedulePolicy(QueryConfig.QuerySchedulePolicyValue policyValue)
policyValue - public float getUnprocessedEventWeight(java.lang.String key)
public java.util.Set<java.lang.String> getUnprocessedEventWeightKeys()
public void setUnprocessedEventWeight(java.lang.String key,
float weight)
key - The fully-qualified-name (Ex: "stocks.symbols", "traffic" etc)
of the Input Stream/Table that supplies Events to this Query
system.weight - public int getAllowedPendingEvents(java.lang.String key)
public java.util.Set<java.lang.String> getAllowedPendingEventsKeys()
public void setAllowedPendingEvents(java.lang.String key,
int events)
key - The fully-qualified-name (Ex: "stocks.symbols", "traffic" etc)
of the Input-Stream/Table that supplies events to this Query
system.events - public boolean isQueryPaused()
public void pauseQuery()
public void resumeQuery()
public long getForceScheduleMarginMsecs()
public void setForceScheduleMarginMsecs(long forceScheduleMarginMsecs)
1.0 if the
time left before a natural/periodic schedule occurs is less than or equal
to this margin.
forceScheduleMarginMsecs - public long getResumeCheckTimeMsecs()
public void setResumeCheckTimeMsecs(long resumeCheckTimeMsecs)
resumeCheckTimeMsecs - public long getStuckJobInterruptionTimeMsecs()
public void setStuckJobInterruptionTimeMsecs(long stuckJobInterruptionTimeMsecs)
stuckJobInterruptionTimeMsecs -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||