use of org.nustaq.kontraktor.util.ActorExecutorService in project kontraktor by RuedigerMoeller.
the class AsyncFile method open.
public void open(Path file, OpenOption... options) throws IOException {
if (fileChannel != null)
throw new RuntimeException("can only open once");
Actor sender = Actor.current();
Set<OpenOption> set = new HashSet<OpenOption>(options.length);
Collections.addAll(set, options);
fileChannel = AsynchronousFileChannel.open(file, set, new ActorExecutorService(sender), NO_ATTRIBUTES);
}
Aggregations