|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LiveQuery
Live query is a query whose result is always kept updated. This interface allows retrieving the query result and tracking changes over the result. After getting the result for the first time, one can track changes over this query result, using the hasChanges and getChanges methods.
Method Summary | |
---|---|
QueryResultChange |
getChanges(QueryResultVersion queryResultVersion)
returns the changes in the result of the query since the result had the given result version Notice that there may be cases where has changes returned true, but get changes will return empty changes since it accumulates changes, for example, if certain object was added and than was removed |
java.lang.String |
getName()
The name of the query. |
LiveTopology |
getQueryResult()
Gets the result of the query. |
boolean |
hasChanges(QueryResultVersion queryResultVersion)
Determines whether there are changes in the result of the query since the result had the given result version. |
LiveQueryResultListener |
removeQueryResultListener()
Unregisters live query listener. |
void |
setChunkKeepingPeriod(int chunkKeepingPeriodInSeconds)
Defines the time that a chunk is available. |
void |
setMaxChunkSize(int maxChunkSize)
Defines a limit for maximum elements per chunk from getQueryResult . |
void |
setQueryResultListener(LiveQueryResultListener listener)
Registers a listener to be called when the result of the query changes. |
LiveQuery |
withDataIntegrityRulesBundle(java.lang.String dataIntegrityRulesBundle)
|
Method Detail |
---|
java.lang.String getName()
LiveTopology getQueryResult() throws UcmdbException
UcmdbException
LiveTopology
boolean hasChanges(QueryResultVersion queryResultVersion) throws UcmdbException
queryResultVersion
- the version of the result.
UcmdbException
QueryResultChange getChanges(QueryResultVersion queryResultVersion) throws FullSyncRequiredException, UcmdbException
queryResultVersion
-
FullSyncRequiredException
UcmdbException
void setMaxChunkSize(int maxChunkSize)
getQueryResult
.
If the result is larger than this limit, query the LiveTopology as to whether
there are more chunks, and retrieve these chunks using
getNextChunk
.
@NotFinalAPI LiveQuery withDataIntegrityRulesBundle(java.lang.String dataIntegrityRulesBundle)
void setChunkKeepingPeriod(int chunkKeepingPeriodInSeconds)
chunkKeepingPeriodInSeconds
- time to keep the chunk in seconds@NotFinalAPI void setQueryResultListener(LiveQueryResultListener listener)
listener
- client-side implementation of the listener interface@NotFinalAPI LiveQueryResultListener removeQueryResultListener() throws UcmdbException
UcmdbException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |