Skip to content

Commit 898af25

Browse files
committed
Remove need for license file in GdsSession
1 parent 104fa7a commit 898af25

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

core-utils/src/main/java/org/neo4j/gds/utils/PriorityServiceLoader.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ public final class PriorityServiceLoader {
2929

3030
private PriorityServiceLoader() {}
3131

32+
/**
33+
* Find the service and return the one with the maximum priority.
34+
*
35+
* @param serviceClass the service interface to load implementations for
36+
* @param priorityFunction a function that specifies a priority for the service
37+
* @return the service with the maximum priority
38+
* @param <T>
39+
*/
3240
public static <T> T loadService(Class<T> serviceClass, Function<T, Integer> priorityFunction) {
3341
return load(serviceClass, serviceClass.getClassLoader())
3442
.stream()

licensing/src/main/java/org/neo4j/gds/LicensingServiceBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@ public interface LicensingServiceBuilder {
2727

2828
LicensingService build(Config config);
2929

30+
/**
31+
* The LicensingService with the highest priority will be used
32+
* @return the priority of the LicensingService
33+
*/
3034
int priority();
3135
}

0 commit comments

Comments
 (0)