org.geotoolkit.coverage.sql
Interface FutureQuery<V>

Type Parameters:
V - Type of object returned by Future.get() or result().
All Superinterfaces:
Future<V>

public interface FutureQuery<V>
extends Future<V>

The result of a Coverage Database query executed in a background thread. This interface extends the standard Future interface with convenience methods.

Since:
3.11
Version:
3.11
Author:
Martin Desruisseaux (Geomatys)
Module:
coverage/geotk-coverage-sql (download)    View source code for this class

Method Summary
 void invokeAfterCompletion(Runnable task)
          Invokes the given task upon completion of this FutureQuery.
 V result()
          Convenience method which block until the result is available, or throw the appropriate exception otherwise.
 
Methods inherited from interface Future
cancel, get, get, isCancelled, isDone
 

Method Detail

result

V result()
         throws DatabaseVetoException,
                CoverageStoreException,
                CancellationException
Convenience method which block until the result is available, or throw the appropriate exception otherwise.

Returns:
The result of the given task.
Throws:
DatabaseVetoException - If a listener vetoed against the operation.
CoverageStoreException - If an error occurred while executing the task.
CancellationException - if the computation was canceled.

invokeAfterCompletion

void invokeAfterCompletion(Runnable task)
Invokes the given task upon completion of this FutureQuery. If this FutureQuery is already completed, then the given task is executed immediately in the current thread. Otherwise this method returns immediately, and the given task will be executed in this FutureQuery thread after the query has completed either.

The given task is executed exactly once, either on success or failure.

Parameters:
task - The task to execute after completion of this FutureQuery.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.