Masthead
HomeComposable Futures with Akka 2.0Enterprise Adobe Flash Platform SeriesFree Presentations

Composable Futures with Akka 2.0

Featuring Java and Scala Code Examples

Table of Contents

Preface

About This Book

Target Audience

How to Read This Book

About the Code Examples

Acknowledgements

About the Author

Overview

What is a Future?

Asynchronous and Non-Blocking

Asynchronous Programming

Future Parallelism vs. Actor Concurrency

Program Mainline and Callbacks

Future of Futures

Akka Future vs j.u.c.Future

Quick Experiment With Futures

Simple Example of a Future

Scala Parallel Collections vs. Akka Futures

java.util.concurrent and Akka

Threadpools and Their Factories

Daemon Threads

Fork / Join Framework

JVM Flags

Akka Enhancements

j.u.c. ExecutionContext versus Akka Dispatcher

ActorSystem Methods and Properties

Akka Configuration

Accessing Shared Mutable State From a Future

Complete Problem Statement and Solutions

Classes and Interfaces

Definitions

Scala and Java

Scala

Java

Java Support

Accessing Idiomatic Scala from Java

Option/Some/None

Either/Left/Right

Working with javap

The Akka Java API

Higher-Order Function Support

AbstractFunction0

Akka's Java Support Methods

Callbacks

Foreach

Mapper

OnComplete

OnFailure

OnSuccess

Recover

Callbacks

future()

promise()

Future Transformations

About Transformations

Futures and For-Comprehensions

filter() and filterOf()

flatMap()

flow()

fold()

map()

mapTo()

withFilter()

zip()

Single Future Support

Properties

Try-Catch-Finally Constructs

Methods

andThen()

apply()

blocking()

failed()

fallbackTo()

foreach()

future()

onComplete()

onFailure()

onSuccess()

ready()

recover()

recoverWIth()

result()

successful()

Future Collection Transformations

find()

firstCompletedOf()

reduce()

sequence()

traverse()

Promises

Retrofitting Akka Futures to An Existing Project

Chaining Akka Future to ListenableFuture

Index