Este contenido no está disponible en el idioma seleccionado.
7.5.2. NotifyingFutures Example
The following is an example depicting how to use
NotifyingFutures in JBoss Data Grid:
FutureListener futureListener = new FutureListener() {
public void futureDone(Future future) {
try {
future.get();
} catch (Exception e) {
// Future did not complete successfully
System.out.println("Help!");
}
}
};
cache.putAsync("key", "value").attachListener(futureListener);