Package org.apache.marmotta.platform.core.api.task

Examples of org.apache.marmotta.platform.core.api.task.Task.updateProgress()


             
              if (StandardWatchEventKinds.ENTRY_CREATE.equals(event.kind())) {
                if (file.isDirectory()) {
                  //recursive registration of sub-directories
                  register(Paths.get(dir.toString(), item.toString()), watcher, StandardWatchEventKinds.ENTRY_CREATE, StandardWatchEventKinds.ENTRY_DELETE);
                  task.updateProgress(++count);
                } else {
                  URI context = getTargetContext(file);
                  log.debug("Importing '{}'...", file.getAbsolutePath());
                  task.updateMessage("importing...");
                  task.updateDetailMessage(TASK_DETAIL_PATH, file.getAbsolutePath());
View Full Code Here


                      file.delete();
                    } catch (Exception ex) {
                      log.error("Error deleing {}: {}", file.getAbsolutePath(), ex.getMessage());
                    }
                  }
                  task.updateProgress(++count);
                  task.updateMessage("watching...");
                  task.updateDetailMessage(TASK_DETAIL_PATH, path);
                  task.removeDetailMessage(TASK_DETAIL_CONTEXT);
                }
              } else if (StandardWatchEventKinds.ENTRY_DELETE.equals(event.kind()) && Files.isDirectory(item)) {
View Full Code Here

                  task.updateDetailMessage(TASK_DETAIL_PATH, path);
                  task.removeDetailMessage(TASK_DETAIL_CONTEXT);
                }
              } else if (StandardWatchEventKinds.ENTRY_DELETE.equals(event.kind()) && Files.isDirectory(item)) {
                //TODO: unregister deleted directories?
                task.updateProgress(++count);
              }
             
            }
            if (!key.reset()) {
              // exit loop if the key is not valid
View Full Code Here

            log.trace("Watchdog: starting up");
            final Task task = getTask();
            int count = 0;
            while (running) {
                task.updateMessage("cleaning up");
                task.updateProgress(++count);
                try {
                    HashSet<Thread> dead = new HashSet<Thread>();
                    for (Thread t : tasks.keySet()) {
                        if (!t.isAlive()) {
                            dead.add(t);
View Full Code Here

            log.trace("Watchdog: starting up");
            final Task task = getTask();
            int count = 0;
            while (running) {
                task.updateMessage("cleaning up");
                task.updateProgress(++count);
                try {
                    HashSet<Thread> dead = new HashSet<Thread>();
                    for (Thread t : tasks.keySet()) {
                        if (!t.isAlive()) {
                            dead.add(t);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.