Search in sources :

Example 1 with ActorExecutorService

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);
}
Also used : ActorExecutorService(org.nustaq.kontraktor.util.ActorExecutorService) Actor(org.nustaq.kontraktor.Actor) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 Actor (org.nustaq.kontraktor.Actor)1 ActorExecutorService (org.nustaq.kontraktor.util.ActorExecutorService)1