ApiProxy.ApiResultFuture (Google App Engine API for Java)

com.google.apphosting.api

Interface ApiProxy.ApiResultFuture<T>

  • All Superinterfaces:
    java.util.concurrent.Future<T>
    Enclosing class:
    ApiProxy


    public static interface ApiProxy.ApiResultFuture<T>
    extends java.util.concurrent.Future<T>
    A subtype of Future that provides more detailed information about the timing and resource consumption of particular API calls.

    Objects returned from ApiProxy.makeAsyncCall(String,String,byte[],ApiConfig) may implement this interface. However, callers should not currently assume that all RPCs will.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      long getCpuTimeInMegaCycles()
      Returns the amount of CPU time consumed across any backend servers responsible for serving this API call.
      long getWallclockTimeInMillis()
      Returns the amount of wallclock time, measured in milliseconds, that this API call took to complete, as measured from the client side.
      • Methods inherited from interface java.util.concurrent.Future

        cancel, get, get, isCancelled, isDone
    • Method Detail

      • getCpuTimeInMegaCycles

        long getCpuTimeInMegaCycles()
        Returns the amount of CPU time consumed across any backend servers responsible for serving this API call. This quantity is measured in millions of CPU cycles to avoid suming times across a hetergeneous machine set with varied CPU clock speeds.
        Throws:
        java.lang.IllegalStateException - If the RPC has not yet completed.
      • getWallclockTimeInMillis

        long getWallclockTimeInMillis()
        Returns the amount of wallclock time, measured in milliseconds, that this API call took to complete, as measured from the client side.
        Throws:
        java.lang.IllegalStateException - If the RPC has not yet completed.