-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Moved pool option to commands that require it
- Loading branch information
Showing
53 changed files
with
1,596 additions
and
1,358 deletions.
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
core/riot-core/src/main/java/com/redis/riot/core/AbstractCallableCommand.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,38 @@ | ||
package com.redis.riot.core; | ||
|
||
import java.util.concurrent.Callable; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import picocli.CommandLine.Command; | ||
import picocli.CommandLine.Option; | ||
|
||
@Command | ||
public abstract class AbstractCallableCommand extends BaseCommand implements Callable<Integer> { | ||
|
||
@Option(names = "--help", usageHelp = true, description = "Show this help message and exit.") | ||
private boolean helpRequested; | ||
|
||
protected Logger log; | ||
|
||
@Override | ||
public Integer call() throws Exception { | ||
if (log == null) { | ||
log = LoggerFactory.getLogger(getClass()); | ||
} | ||
execute(); | ||
return 0; | ||
} | ||
|
||
protected abstract void execute() throws Exception; | ||
|
||
public Logger getLog() { | ||
return log; | ||
} | ||
|
||
public void setLog(Logger log) { | ||
this.log = log; | ||
} | ||
|
||
} |
89 changes: 0 additions & 89 deletions
89
core/riot-core/src/main/java/com/redis/riot/core/AbstractCommand.java
This file was deleted.
Oops, something went wrong.
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
169 changes: 0 additions & 169 deletions
169
core/riot-core/src/main/java/com/redis/riot/core/LoggingArgs.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.