Class CQInfo
java.lang.Object
org.apache.iotdb.confignode.persistence.cq.CQInfo
- All Implemented Interfaces:
SnapshotProcessor
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactiveCQ(ActiveCQPlan plan) Change the state of cq to ACTIVE.Add a new CQ only if there was no mapping for this cqId, otherwise ignore this operation.dropCQ(DropCQPlan plan) Drop the CQ whose ID is same as cqId in plan.booleaninthashCode()voidprocessLoadSnapshot(File snapshotDir) booleanprocessTakeSnapshot(File snapshotDir) showCQ()Update the last execution time of the corresponding CQ.
-
Constructor Details
-
CQInfo
public CQInfo()
-
-
Method Details
-
addCQ
Add a new CQ only if there was no mapping for this cqId, otherwise ignore this operation.- Returns:
- SUCCESS_STATUS if there was no mapping for this cqId, otherwise CQ_AlREADY_EXIST
-
dropCQ
Drop the CQ whose ID is same as cqId in plan.- Returns:
- SUCCESS_STATUS if there is CQ whose ID and md5 is same as cqId in plan, otherwise NO_SUCH_CQ.
-
showCQ
-
activeCQ
Change the state of cq to ACTIVE.- Returns:
- Optional.empty() if there is no such cq, otherwise previous state of this cq.
-
updateCQLastExecutionTime
Update the last execution time of the corresponding CQ.- Returns:
- SUCCESS_STATUS if successfully updated, or NO_SUCH_CQ if 1. the CQ doesn't exist; or 2. md5 is different. or CQ_UPDATE_LAST_EXEC_TIME_FAILED 3. original lastExecutionTime >= current lastExecutionTime;
-
processTakeSnapshot
public boolean processTakeSnapshot(File snapshotDir) throws org.apache.thrift.TException, IOException - Specified by:
processTakeSnapshotin interfaceSnapshotProcessor- Throws:
org.apache.thrift.TExceptionIOException
-
processLoadSnapshot
- Specified by:
processLoadSnapshotin interfaceSnapshotProcessor- Throws:
org.apache.thrift.TExceptionIOException
-
equals
-
hashCode
public int hashCode()
-