Class MapReduceTaskResult
Tracks the execution of MapReduce Task.
Inheritance
Namespace:
Assembly: Alachisoft.NCache.Web.dll
Syntax
public class MapReduceTaskResult : ITrackableTask
Constructors
MapReduceTaskResult(ITaskManagement, String)
Initialize a new instance of class.
Declaration
public MapReduceTaskResult(ITaskManagement taskMgmt, string taskId)
Parameters
Type | Name | Description |
---|---|---|
ITaskManagement | taskMgmt | instance of ITaskManagement. |
System.String | taskId | task id of the Task. |
Properties
TaskId
Unique GUID identification of MapReduce task.
Declaration
public string TaskId { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
TaskStatus
Returns the status of task.
Declaration
public TaskStatus TaskStatus { get; }
Property Value
Type | Description |
---|---|
TaskStatus |
Implements
Methods
CancelTask()
Cancel the already running task.
Declaration
public void CancelTask()
Implements
GetResult()
Blocking call that waits untill server returns the result in form of completion, failure or cancellation of a task.
Declaration
public ITaskResult GetResult()
Returns
Type | Description |
---|---|
ITaskResult | Returns an ITaskResult instance |
Implements
GetResult(Int32)
If no result is obtained within the provided timeout, Operationfailedexception will be thrown.
Declaration
public ITaskResult GetResult(int timeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | timeout | Time in millisecond in which if result is not returned, thread will be terminated and exception or null will be given |
Returns
Type | Description |
---|---|
ITaskResult | Returns an ITaskResult instance |
Implements
Events
OnMapReduceComplete
Registered Async callback on completion, failure or cancellation of task.
Declaration
public event MapReduceCallback OnMapReduceComplete
Event Type
Type | Description |
---|---|
MapReduceCallback |