Use Java-21 virtual threads
This commit is contained in:
parent
82eb6671a3
commit
bef47b308d
6 changed files with 15 additions and 17 deletions
|
|
@ -85,7 +85,7 @@ public class K8sObserver<O extends KubernetesObject,
|
|||
api = new GenericKubernetesApi<>(objectClass, objectListClass,
|
||||
context.getGroup(), context.getPreferredVersion(),
|
||||
context.getResourcePlural(), client);
|
||||
thread = new Thread(() -> {
|
||||
thread = Thread.ofVirtual().unstarted(() -> {
|
||||
try {
|
||||
logger.config(() -> "Watching " + context.getResourcePlural()
|
||||
+ " (" + context.getPreferredVersion() + ")"
|
||||
|
|
@ -100,7 +100,7 @@ public class K8sObserver<O extends KubernetesObject,
|
|||
while (changed.hasNext()) {
|
||||
handler.accept(client, changed.next());
|
||||
}
|
||||
} catch (ApiException e) {
|
||||
} catch (ApiException | RuntimeException e) {
|
||||
logger.log(Level.FINE, e, () -> "Problem watching"
|
||||
+ " (will retry): " + e.getMessage());
|
||||
delayRestart(startedAt);
|
||||
|
|
@ -117,7 +117,6 @@ public class K8sObserver<O extends KubernetesObject,
|
|||
}
|
||||
}
|
||||
});
|
||||
thread.setDaemon(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ plugins {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
api 'org.jgrapes:org.jgrapes.core:[1.19.0,2)'
|
||||
api 'org.jgrapes:org.jgrapes.core:[1.21.0,2)'
|
||||
api project(':org.jdrupes.vmoperator.common')
|
||||
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.16.1,3]'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,15 +13,14 @@ dependencies {
|
|||
|
||||
implementation 'commons-cli:commons-cli:1.5.0'
|
||||
|
||||
implementation 'org.jgrapes:org.jgrapes.core:[1.19.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.io:[2.7.0,3)'
|
||||
implementation 'org.jgrapes:org.jgrapes.http:[3.1.0,4)'
|
||||
implementation 'org.jgrapes:org.jgrapes.util:[1.34.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.util:[1.36.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.io:[2.11.0,3)'
|
||||
implementation 'org.jgrapes:org.jgrapes.http:[3.5.0,4)'
|
||||
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.base:[1.7.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.base:[1.8.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.vuejs:[1.5.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.rbac:[1.3.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconlet.oidclogin:[1.6.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.rbac:[1.4.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconlet.oidclogin:[1.7.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconlet.markdowndisplay:[1.2.0,2)'
|
||||
|
||||
runtimeOnly 'org.jgrapes:org.jgrapes.webconlet.sysinfo:[1.4.0,2)'
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ plugins {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.jgrapes:org.jgrapes.core:[1.19.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.io:[2.7.0,3)'
|
||||
implementation 'org.jgrapes:org.jgrapes.http:[3.1.0,4)'
|
||||
implementation 'org.jgrapes:org.jgrapes.util:[1.31.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.core:[1.21.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.util:[1.36.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.io:[2.11.0,3)'
|
||||
implementation 'org.jgrapes:org.jgrapes.http:[3.5.0,4)'
|
||||
implementation project(':org.jdrupes.vmoperator.common')
|
||||
|
||||
implementation 'commons-cli:commons-cli:1.5.0'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ plugins {
|
|||
dependencies {
|
||||
implementation project(':org.jdrupes.vmoperator.manager.events')
|
||||
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.base:[1.3.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.base:[1.8.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.vue:[1,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.jgwcvuecomponents:[1.2,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.chartjs:[1.2,2)'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ plugins {
|
|||
dependencies {
|
||||
implementation project(':org.jdrupes.vmoperator.manager.events')
|
||||
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.base:[1.7.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.base:[1.8.0,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.vue:[1,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.jgwcvuecomponents:[1.2,2)'
|
||||
implementation 'org.jgrapes:org.jgrapes.webconsole.provider.chartjs:[1.2,2)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue