forked from hazelcast/hazelcast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JobBuilder to JetService [CORE-31] (#1157)
Implements https://hazelcast.atlassian.net/browse/CORE-31 TDD: https://hazelcast.atlassian.net/wiki/spaces/PM/pages/4901896273/TDD+High+Availability+-+Compute+Isolation GitOrigin-RevId: 151bdbbd1ecc2183eb8d4f828be1f3eca5c8cb23
- Loading branch information
1 parent
fe501b4
commit d122cb8
Showing
5 changed files
with
439 additions
and
3 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
hazelcast/src/main/java/com/hazelcast/jet/JetMemberSelector.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,41 @@ | ||
/* | ||
* Copyright (c) 2008-2024, Hazelcast, Inc. All Rights Reserved. | ||
* | ||
* Licensed 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 com.hazelcast.jet; | ||
|
||
import com.hazelcast.cluster.Member; | ||
import com.hazelcast.function.PredicateEx; | ||
|
||
/** | ||
* Selects the members on which a specific job will run. | ||
* | ||
* @see JetService.JobBuilder#withMemberSelector(JetMemberSelector) | ||
* @since 5.5 | ||
*/ | ||
@FunctionalInterface | ||
public interface JetMemberSelector extends PredicateEx<Member> { | ||
|
||
/** | ||
* Selects all lite members on the cluster. | ||
*/ | ||
JetMemberSelector ALL_LITE_MEMBERS = Member::isLiteMember; | ||
|
||
/** | ||
* Predicate to select members on which the job will run. | ||
*/ | ||
@Override | ||
boolean testEx(Member member); | ||
} |
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
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
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
Oops, something went wrong.