java - Using Future<V> -


in documentation, shows example code future<v>, in gae datastore orm's can see usages pattern, implication of using future on doing datastore put, get or delete methods? common motivation on doing this?

the reason future used because database operations done asynchronously, can carry on doing whatever , come check result of database operation.

the implications of asynchronous store read value stale, ie put has been sent future operation not complete, or worse, value has been deleted, orm has solved you.

you can use future.get block current thread , wait operation complete , check result.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -