com.sun.sgs.impl.nio
Class Util.DoneFuture<V>

java.lang.Object
  extended by com.sun.sgs.impl.nio.Util.DoneFuture<V>
Type Parameters:
V - the result type
All Implemented Interfaces:
Future<V>
Enclosing class:
Util

abstract static class Util.DoneFuture<V>
extends Object
implements Future<V>

Base class for an already-finished Future.


Constructor Summary
protected Util.DoneFuture()
          Allows construction by a subclass.
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
          
abstract  V get()
          
 V get(long timeout, TimeUnit unit)
          
 boolean isCancelled()
          
 boolean isDone()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util.DoneFuture

protected Util.DoneFuture()
Allows construction by a subclass.

Method Detail

get

public V get(long timeout,
             TimeUnit unit)
      throws ExecutionException

This implementation calls get(), and never throws InterruptedException or TimeoutException.

Specified by:
get in interface Future<V>
Throws:
ExecutionException

get

public abstract V get()
               throws ExecutionException

Never throws InterruptedException.

Specified by:
get in interface Future<V>
Throws:
ExecutionException

cancel

public boolean cancel(boolean mayInterruptIfRunning)

This implementation always returns false.

Specified by:
cancel in interface Future<V>

isCancelled

public boolean isCancelled()

This implementation always returns false.

Specified by:
isCancelled in interface Future<V>

isDone

public boolean isDone()

This implementation always returns true.

Specified by:
isDone in interface Future<V>

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved