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
public class PostgresProcess extends AbstractPGProcess<PostgresExecutable, PostgresProcess> { | |
... | |
@Override | |
protected void onBeforeProcess(IRuntimeConfig runtimeConfig) | |
throws IOException { | |
super.onBeforeProcess(runtimeConfig); | |
PostgresConfig config = getConfig(); | |
runCmd(config, InitDb, "Success. You can now start the database server using", 1000, | |
/** | |
* Need this arguments here |
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
import java.util.concurrent.Executors; | |
/** | |
* Using javas {@link java.util.concurrent.ExecutorService ExecutorService} to run an action concurrently | |
*/ | |
public class MyConcurrentJob{ | |
public void justDoIt(){ | |
Runnable action = () -> { | |
try { | |
// do whatever you like to do here... |