Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.jpackage.jmod - JPackage Tool
JDK 17 jdk.jpackage.jmod is the JMOD file for JDK 17 JPackage tool,
which can be invoked by the "jpackage" command.
JDK 17 JPackage tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jpackage.jmod.
JDK 17 JPackage tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JPackage tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jpackage.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jpackage/internal/RetryExecutor.java
/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.jpackage.internal;
import java.io.IOException;
import java.util.function.Consumer;
import java.util.function.Supplier;
public final class RetryExecutor {
public RetryExecutor() {
setMaxAttemptsCount(5);
setAttemptTimeoutMillis(2 * 1000);
setWriteOutputToFile(false);
}
public RetryExecutor setMaxAttemptsCount(int v) {
attempts = v;
return this;
}
public RetryExecutor setAttemptTimeoutMillis(int v) {
timeoutMillis = v;
return this;
}
RetryExecutor setWriteOutputToFile(boolean v) {
writeOutputToFile = v;
return this;
}
public RetryExecutor setExecutorInitializer(Consumer<Executor> v) {
executorInitializer = v;
return this;
}
public void abort() {
aborted = true;
}
public boolean isAborted() {
return aborted;
}
static RetryExecutor retryOnKnownErrorMessage(String v) {
RetryExecutor result = new RetryExecutor();
return result.setExecutorInitializer(exec -> {
exec.setOutputConsumer(output -> {
if (!output.anyMatch(v::equals)) {
result.abort();
}
});
});
}
public void execute(String cmdline[]) throws IOException {
executeLoop(() ->
Executor.of(cmdline).setWriteOutputToFile(writeOutputToFile));
}
public void execute(ProcessBuilder pb) throws IOException {
executeLoop(() ->
Executor.of(pb).setWriteOutputToFile(writeOutputToFile));
}
private void executeLoop(Supplier<Executor> execSupplier) throws IOException {
aborted = false;
for (;;) {
if (aborted) {
break;
}
try {
Executor exec = execSupplier.get();
if (executorInitializer != null) {
executorInitializer.accept(exec);
}
exec.executeExpectSuccess();
break;
} catch (IOException ex) {
if (aborted || (--attempts) <= 0) {
throw ex;
}
}
try {
Thread.sleep(timeoutMillis);
} catch (InterruptedException ex) {
Log.verbose(ex);
throw new RuntimeException(ex);
}
}
}
private Consumer<Executor> executorInitializer;
private boolean aborted;
private int attempts;
private int timeoutMillis;
private boolean writeOutputToFile;
}
⏎ jdk/jpackage/internal/RetryExecutor.java
Or download all of them as a single archive file:
File name: jdk.jpackage-17.0.5-src.zip File size: 92069 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jshell.jmod - JShell Tool
2023-08-03, ≈12🔥, 0💬
Popular Posts:
JDK 11 jrt-fs.jar is the JAR file for JDK 11 JRT-FS (Java RunTime - File System) defined in the "jdk...
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 17 jdk.hotspot.agent.jmod is the JMOD file for JDK 17 Hotspot Agent module. JDK 17 Hotspot Agent...
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module. JDK 11 JFR module compiled class files a...