-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INLONG-10395][Manager] Add interface for schedule client and engine (#…
…10397) * [INLONG-10395][Manager] Add interface for schedule client and engine
- Loading branch information
1 parent
43b29b4
commit a915bb1
Showing
4 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.inlong</groupId> | ||
<artifactId>inlong-manager</artifactId> | ||
<version>1.13.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>manager-schedule</artifactId> | ||
|
||
<properties> | ||
<inlong.root.dir>${project.parent.parent.basedir}</inlong.root.dir> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.inlong</groupId> | ||
<artifactId>manager-pojo</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
54 changes: 54 additions & 0 deletions
54
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/schedule/ScheduleEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.schedule; | ||
|
||
import org.apache.inlong.manager.pojo.schedule.ScheduleInfo; | ||
|
||
/** | ||
* Build-in schedule engine, provides basic schedule capabilities. | ||
* */ | ||
public interface ScheduleEngine { | ||
|
||
/** | ||
* Start schedule engine. | ||
* */ | ||
void start(); | ||
|
||
/** | ||
* Handle schedule register. | ||
* @param scheduleInfo schedule info to register | ||
* */ | ||
boolean handleRegister(ScheduleInfo scheduleInfo); | ||
|
||
/** | ||
* Handle schedule unregister. | ||
* @param scheduleInfo schedule info to unregister | ||
* */ | ||
boolean handleUnregister(ScheduleInfo scheduleInfo); | ||
|
||
/** | ||
* Handle schedule update. | ||
* @param scheduleInfo schedule info to update | ||
* */ | ||
boolean handleUpdate(ScheduleInfo scheduleInfo); | ||
|
||
/** | ||
* Stop schedule engine. | ||
* */ | ||
void stop(); | ||
} |
45 changes: 45 additions & 0 deletions
45
...nager/manager-schedule/src/main/java/org/apache/inlong/schedule/ScheduleEngineClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.schedule; | ||
|
||
import org.apache.inlong.manager.pojo.schedule.ScheduleInfo; | ||
|
||
/** | ||
* Interface for schedule engine client which responses for communicating with schedule engine. | ||
* */ | ||
public interface ScheduleEngineClient { | ||
|
||
/** | ||
* Register schedule to schedule engine. | ||
* @param scheduleInfo schedule info to register | ||
* */ | ||
boolean register(ScheduleInfo scheduleInfo); | ||
|
||
/** | ||
* Un-register schedule from schedule engine. | ||
* @param scheduleInfo schedule info to unregister | ||
* */ | ||
boolean unregister(ScheduleInfo scheduleInfo); | ||
|
||
/** | ||
* Update schedule from schedule engine. | ||
* @param scheduleInfo schedule info to update | ||
* */ | ||
boolean update(ScheduleInfo scheduleInfo); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters