mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
29.21.2018 503c8bdcd975032f9f315c1233e99c69d200a065
Job handling removed (done by JobQueue).
1 files modified
35 ■■■■■ changed files
borgbutler-core/src/main/java/de/micromata/borgbutler/BorgCommand.java 35 ●●●●● patch | view | raw | blame | history
borgbutler-core/src/main/java/de/micromata/borgbutler/BorgCommand.java
@@ -16,28 +16,6 @@
public class BorgCommand {
    private Logger log = LoggerFactory.getLogger(BorgCommand.class);
    /**
     * The current Thread assigned to this command sets the state and reads for the state {@link State#TERMINATE_SIGNAL_RECEIVED}.
     * If received, the thread will be terminated without executing the borg command.
     */
    public enum State {
        /**
         * This command is waiting in the queue.
         */
        WAITING_IN_QUEUE,
        /**
         * This command is running (beeing executed).
         */
        RUNNING,
        /**
         * This command should not be terminated before starting.
         */
        TERMINATE_SIGNAL_RECEIVED}
    public enum ResultStatus {
        OK, ERROR
    }
    @Getter
    @Setter
    private File workingDir;
@@ -54,8 +32,6 @@
    @Getter
    @Setter
    private String archive;
    @Getter
    private State state;
    /**
     * For displaying and information purposes for the user only, when browsing the current command queue.
     */
@@ -69,17 +45,6 @@
    @Setter(AccessLevel.PACKAGE)
    private String response;
    @Getter
    @Setter(AccessLevel.PACKAGE)
    private ResultStatus resultStatus;
    /**
     * Requests the thread handling this command to terminate / cancel this action.
     */
    public void terminate() {
        this.state = State.TERMINATE_SIGNAL_RECEIVED;
    }
    BorgCommand setArgs(String... args) {
        this.args = args;
        return this;