Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47891-01

AbstractPriorityTask Class Reference

#include <coherence/net/AbstractPriorityTask.hpp>

Inherits Object, PortableObject, and PriorityTask.

Inherited by PriorityAggregator, PriorityFilter, and PriorityProcessor.

List of all members.


Detailed Description

An abstract base for AbstractPriorityTask implementations.

It implements all AbstractPriorityTask interface methods and is intended to be extended for concrete uses.

Author:
djl 2008.05.15

Public Types

typedef spec::Handle Handle
 AbstractPriorityTask Handle definition.
typedef spec::View View
 AbstractPriorityTask View definition.
typedef spec::Holder Holder
 AbstractPriorityTask Holder definition.

Public Member Functions

virtual int32_t getSchedulingPriority () const
 Obtain this task's scheduling priority.

Valid values are one of the SCHEDULE_* constants.

Returns:
this task's scheduling priority

virtual int64_t getExecutionTimeoutMillis () const
 Obtain the maximum amount of time this task is allowed to run before the corresponding service will attempt to stop it.

The value of timeout_default indicates a default timeout value configured for the corresponding service; the value of timeout_none indicates that this task can execute indefinitely.

If, by the time the specified amount of time passed, the task has not finished, the service will attempt to stop the execution by using the Thread::interrupt() method. In the case that interrupting the thread does not result in the task's termination, the runCanceled method will be called.

Returns:
the execution timeout value in millisecods or one of the special TIMEOUT_* values

virtual int64_t getRequestTimeoutMillis () const
 Obtain the maximum amount of time a calling thread is willing to wait for a result of the request execution.

The request time is measured on the client side as the time elapsed from the moment a request is sent for execution to the corresponding server node(s) and includes:

  • the time it takes to deliver the request to the executing node(s);
  • the interval between the time the task is received and placed into a service queue until the execution starts;
  • the task execution time;
  • the time it takes to deliver a result back to the client.

The value of timeout_default indicates a default timeout value configured for the corresponding service; the value of timeout_none timeout_none indicates that the client thread is willing to wait indefinitely until the task execution completes or is canceled by the service due to a task execution timeout specified by the getExecutionTimeoutMillis() value.

If the specified amount of time elapsed and the client has not received any response from the server, an RequestTimeoutException will be thrown to the caller.

Returns:
the request timeout value in milliseconds or one of the special TIMEOUT_* values

virtual void runCanceled (bool fAbandoned)
 This method will be called if and only if all attempts to interrupt this task were unsuccesful in stopping the execution or if the execution was canceled before it had a chance to run at all.

Since this method is usually called on a service thread, implementors must exercise extreme caution since any delay introduced by the implementation will cause a delay of the corresponding service.

Parameters:
fAbandoned true if the task has timed-out, but all attempts to interrupt it were unsuccesful in stopping the execution; otherwise the task was never started

virtual void readExternal (PofReader::Handle hIn)
 
virtual void writeExternal (PofWriter::Handle hOut) const
 
virtual void setSchedulingPriority (int32_t iPriority)
 Specify this task's scheduling priority.
virtual void setExecutionTimeoutMillis (int64_t lTimeout)
 Specify the maximum amount of time this task is allowed to run before the corresponding service will attempt to stop it.
virtual void setRequestTimeoutMillis (int64_t lTimeout)
 Specify the maximum amount of time a calling thread is willing to wait for a result of the request execution.

Member Function Documentation

virtual void runCanceled ( bool  fAbandoned  )  [virtual]

This method will be called if and only if all attempts to interrupt this task were unsuccesful in stopping the execution or if the execution was canceled before it had a chance to run at all.

Since this method is usually called on a service thread, implementors must exercise extreme caution since any delay introduced by the implementation will cause a delay of the corresponding service.

Parameters:
fAbandoned true if the task has timed-out, but all attempts to interrupt it were unsuccesful in stopping the execution; otherwise the task was never started

This implementation is a no-op.

Implements PriorityTask.

virtual void setSchedulingPriority ( int32_t  iPriority  )  [virtual]

Specify this task's scheduling priority.

Valid values are one of the SCHEDULE_* constants.

Parameters:
iPriority this task's scheduling priority

virtual void setExecutionTimeoutMillis ( int64_t  lTimeout  )  [virtual]

Specify the maximum amount of time this task is allowed to run before the corresponding service will attempt to stop it.

Parameters:
lTimeout the task timeout value in milliseconds

virtual void setRequestTimeoutMillis ( int64_t  lTimeout  )  [virtual]

Specify the maximum amount of time a calling thread is willing to wait for a result of the request execution.

Parameters:
lTimeout the request timeout value in milliseconds


The documentation for this class was generated from the following file:
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.