ForkJoinTask ForkJoinTask Class

Definition

Abstract base class for tasks that run within a ForkJoinPool.

[Android.Runtime.Register("java/util/concurrent/ForkJoinTask", ApiSince=21, DoNotGenerateAcw=true)]
[Java.Interop.JavaTypeParameters(new System.String[] { "V" })]
public abstract class ForkJoinTask : Java.Lang.Object, IDisposable, Java.IO.ISerializable, Java.Util.Concurrent.IFuture
type ForkJoinTask = class
    inherit Object
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IFuture
Inheritance
ForkJoinTaskForkJoinTask
Derived
Attributes
Implements

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

ForkJoinTask() ForkJoinTask()
ForkJoinTask(IntPtr, JniHandleOwnership) ForkJoinTask(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Exception Exception

Returns the exception thrown by the base computation, or a CancellationException if cancelled, or null if none or if the method has not yet completed.

ForkJoinTaskTag ForkJoinTaskTag
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsCancelled IsCancelled

Returns true if this task was cancelled before it completed normally.

IsCompletedAbnormally IsCompletedAbnormally

Returns true if this task threw an exception or was cancelled.

IsCompletedNormally IsCompletedNormally

Returns true if this task completed without throwing an exception and was not cancelled.

IsDone IsDone

Returns true if this task completed.

JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PeerReference PeerReference Inherited from Object
Pool Pool

Returns the pool hosting the current task execution, or null if this task is executing outside of any ForkJoinPool.

QueuedTaskCount QueuedTaskCount

Returns an estimate of the number of tasks that have been forked by the current worker thread but not yet executed.

RawRawResult RawRawResult

Returns the result that would be returned by Join(), even if this task completed abnormally, or null if this task is not known to have been completed.

SurplusQueuedTaskCount SurplusQueuedTaskCount
ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Adapt(ICallable) Adapt(ICallable)
Adapt(IRunnable) Adapt(IRunnable)

Returns a new ForkJoinTask that performs the run method of the given Runnable as its action, and returns a null result upon Join().

Adapt(IRunnable, Object) Adapt(IRunnable, Object)
Cancel(Boolean) Cancel(Boolean)

Attempts to cancel execution of this task.

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CompareAndSetForkJoinTaskTag(Int16, Int16) CompareAndSetForkJoinTaskTag(Int16, Int16)
Complete(Object) Complete(Object)
CompleteExceptionally(Throwable) CompleteExceptionally(Throwable)

Completes this task abnormally, and if not already aborted or cancelled, causes it to throw the given exception upon join and related operations.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
Exec() Exec()

Immediately performs the base action of this task and returns true if, upon return from this method, this task is guaranteed to have completed normally.

Fork() Fork()

Arranges to asynchronously execute this task in the pool the current task is running in, if applicable, or using the ForkJoinPool.commonPool() if not InForkJoinPool().

Get() Get()

Waits if necessary for the computation to complete, and then retrieves its result.

Get(Int64, TimeUnit) Get(Int64, TimeUnit)

Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.

GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
HelpQuiesce() HelpQuiesce()

Possibly executes tasks until the pool hosting the current task IsQuiescent.

InForkJoinPool() InForkJoinPool()

Returns true if the current thread is a ForkJoinWorkerThread executing as a ForkJoinPool computation.

Invoke() Invoke()

Commences performing this task, awaits its completion if necessary, and returns its result, or throws an (unchecked) RuntimeException or Error if the underlying computation did so.

InvokeAll(ForkJoinTask, ForkJoinTask) InvokeAll(ForkJoinTask, ForkJoinTask)
InvokeAll(ForkJoinTask[]) InvokeAll(ForkJoinTask[])
InvokeAll(ICollection) InvokeAll(ICollection)
JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Join() Join()

Returns the result of the computation when it IsDone.

Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
PeekNextLocalTask() PeekNextLocalTask()

Returns, but does not unschedule or execute, a task queued by the current thread but not yet executed, if one is immediately available.

PollNextLocalTask() PollNextLocalTask()

Unschedules and returns, without executing, the next task queued by the current thread but not yet executed, if the current thread is operating in a ForkJoinPool.

PollTask() PollTask()
QuietlyComplete() QuietlyComplete()
QuietlyInvoke() QuietlyInvoke()

Commences performing this task and awaits its completion if necessary, without returning its result or throwing its exception.

QuietlyJoin() QuietlyJoin()

Joins this task, without returning its result or throwing its exception.

Reinitialize() Reinitialize()

Resets the internal bookkeeping state of this task, allowing a subsequent fork.

SetForkJoinTaskTag(Int16) SetForkJoinTaskTag(Int16)
SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetRawResult(Object) SetRawResult(Object)
ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
TryUnfork() TryUnfork()

Tries to unschedule this task for execution.

UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)
GetAsync(IFuture) GetAsync(IFuture)
GetAsync(IFuture, Int64, TimeUnit) GetAsync(IFuture, Int64, TimeUnit)

Applies to