add suspend/resume to path event manager
This commit is contained in:
parent
d191369efe
commit
48bbb2e455
2 changed files with 4 additions and 3 deletions
|
@ -2,6 +2,7 @@ package org.xbib.event.io.path;
|
|||
|
||||
import org.xbib.event.Event;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public interface PathEvent extends Event {
|
||||
|
@ -18,8 +19,8 @@ public interface PathEvent extends Event {
|
|||
|
||||
String getSuffix();
|
||||
|
||||
void success();
|
||||
void success() throws IOException;
|
||||
|
||||
void fail();
|
||||
void fail() throws IOException;
|
||||
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ public class PathEventService implements Callable<Integer>, Closeable {
|
|||
}
|
||||
}
|
||||
|
||||
private void failEvent(String key, Path file) {
|
||||
private void failEvent(String key, Path file) throws IOException {
|
||||
PathEvent event = toEvent(key, file);
|
||||
if (event != null) {
|
||||
logger.log(Level.WARNING, "queue " + name + " suspended, event short-circuited to fail");
|
||||
|
|
Loading…
Reference in a new issue