Skip to content

Releases: zakgof/actr

v.0.4.0

21 Jan 12:54
Compare
Choose a tag to compare

API refactoring and naming changes

Separated API and implementation classes (the latter moved to .impl package)

Removed ActorSystem class, introduced public interface IActorSystem instead. To create a new actor system, call Actr.newSystem instead of ActorSystem.create.

Renamed ActorRef to IActorRef for consistency.

Performance optimizations

Better actor creation time.

v.0.3.0

16 Jan 12:35
Compare
Choose a tag to compare

CompletableFuture compatibility

Added two new ActorRef ask methods returning CompletableFuture:

<R> CompletableFuture<R> ask(Function<T, R> action);
<R> CompletableFuture<R> ask(BiConsumer<T, Consumer<R>> action);

These methods pass the actor call result to the CompletableFuture returned from the method. In case of exception occuring during actor call, the exception is also passed to the CompletableFuture (the actor's exception handler is not triggered in that case).

Users are now able to process exceptions coming from actor calls:

primeNumberDetectorActor.askAnsweringFuture(primeNumberDetector -> primeNumberDetector.isNumberPrime(5))
    .thenApply(isPrime -> System.out.println("5 is prime? "+isPrime))
    .exceptionally(ex -> ex.printStackTrace());