Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 639051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:47:57+00:00 2026-05-13T20:47:57+00:00

In the docs , a FutureWrapper is defined like this: FutureWrapper is a simple

  • 0

In the docs, a FutureWrapper is defined like this:

FutureWrapper is a simple Future that
wraps a parent Future.

What’s a Future, why would you need to wrap it and when would you use it in App Engine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:47:58+00:00Added an answer on May 13, 2026 at 8:47 pm

    It’s the java.util.concurrent.Future<V>. The linked Javadoc is pretty clear and contains an example. For the lazy, here’s a copypaste:

    A Future represents the result of an
    asynchronous computation. Methods are
    provided to check if the computation
    is complete, to wait for its
    completion, and to retrieve the result
    of the computation. The result can
    only be retrieved using method get
    when the computation has completed,
    blocking if necessary until it is
    ready. Cancellation is performed by
    the cancel method. Additional methods
    are provided to determine if the task
    completed normally or was cancelled.
    Once a computation has completed, the
    computation cannot be cancelled. If
    you would like to use a Future for the
    sake of cancellability but not provide
    a usable result, you can declare types
    of the form Future<?> and return null
    as a result of the underlying task.

    Sample Usage (Note that the following
    classes are all made-up.)

     interface ArchiveSearcher { String search(String target); }
     class App {
       ExecutorService executor = ...
       ArchiveSearcher searcher = ...
       void showSearch(final String target)
           throws InterruptedException {
         Future<String> future
           = executor.submit(new Callable<String>() {
             public String call() {
                 return searcher.search(target);
             }});
         displayOtherThings(); // do other things while searching
         try {
           displayText(future.get()); // use future
         } catch (ExecutionException ex) { cleanup(); return; }
       }
     }
    

    The FutureTask class is an
    implementation of Future that
    implements Runnable, and so may be
    executed by an Executor. For example,
    the above construction with submit
    could be replaced by:

     FutureTask<String> future =
       new FutureTask<String>(new Callable<String>() {
         public String call() {
           return searcher.search(target);
       }});
     executor.execute(future);  
    

    Memory consistency effects: Actions
    taken by the asynchronous computation
    happen-before actions following the
    corresponding Future.get() in another
    thread.

    The FutureWrapper is just a decorator for any parent Future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 374k
  • Answers 374k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Looks like your gemrc file could be broken. You could… May 14, 2026 at 7:57 pm
  • Editorial Team
    Editorial Team added an answer Use percent encoding. Modern browsers will take care of display… May 14, 2026 at 7:57 pm
  • Editorial Team
    Editorial Team added an answer You can get the PRINT output but not in the… May 14, 2026 at 7:57 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.