Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

oracle.portal.provider.v2.monitor
Class PerfMonitor

java.lang.Object
  extended by java.util.TimerTask
      extended by oracle.portal.provider.v2.monitor.PerfMonitor
All Implemented Interfaces:
java.lang.Runnable

public abstract class PerfMonitor
extends java.util.TimerTask

This class contains the methods and constants for provider code to log performance statistics and to track the progress of a request.


Field Summary
static int CACHE_KEY_REQUEST
           
static int CACHE_KEY_RESPONSE
           
static int CACHE_LEVEL
           
static int CACHE_TYPE
           
static java.lang.String EXPIRES_MISS
           
static int EXPIRY_TIME
           
static int LAST_PROPERTY
           
static int LAST_TIMER
           
static int READ_CUSTOMIZATION_ACCR
           
static int RENDER_FOOTER_TIMER
           
static int RENDER_HEADER_TIMER
           
static boolean[] TIMER_TYPES
           
static java.lang.String VALIDATION_HIT
           
static java.lang.String VALIDATION_NEW
           
static java.lang.String VALIDATION_STALE
           
static int WRITE_CUSTOMIZATION_ACCR
           
 
Constructor Summary
PerfMonitor()
           
 
Method Summary
abstract  void finishTimer(int timerId)
          Stops a timer with a given id.
abstract  boolean hasTimeoutElapsed()
          Used to find whether the execution time of the current request thread has exceeded the provider warning timeout.
abstract  void setProperty(int propertyId, long value)
          Sets a property with a given id to the value specified.
abstract  void setProperty(int propertyId, java.lang.String value)
          Sets a property with a given id to the value specified.
abstract  void startTimer(int timerId)
          Starts a timer with a given id.
 
Methods inherited from class java.util.TimerTask
cancel, run, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATION_HIT

public static final java.lang.String VALIDATION_HIT
See Also:
Constant Field Values

VALIDATION_STALE

public static final java.lang.String VALIDATION_STALE
See Also:
Constant Field Values

VALIDATION_NEW

public static final java.lang.String VALIDATION_NEW
See Also:
Constant Field Values

EXPIRES_MISS

public static final java.lang.String EXPIRES_MISS
See Also:
Constant Field Values

RENDER_HEADER_TIMER

public static final int RENDER_HEADER_TIMER
See Also:
Constant Field Values

RENDER_FOOTER_TIMER

public static final int RENDER_FOOTER_TIMER
See Also:
Constant Field Values

READ_CUSTOMIZATION_ACCR

public static final int READ_CUSTOMIZATION_ACCR
See Also:
Constant Field Values

WRITE_CUSTOMIZATION_ACCR

public static final int WRITE_CUSTOMIZATION_ACCR
See Also:
Constant Field Values

LAST_TIMER

public static final int LAST_TIMER
See Also:
Constant Field Values

TIMER_TYPES

public static boolean[] TIMER_TYPES

CACHE_TYPE

public static final int CACHE_TYPE
See Also:
Constant Field Values

CACHE_LEVEL

public static final int CACHE_LEVEL
See Also:
Constant Field Values

EXPIRY_TIME

public static final int EXPIRY_TIME
See Also:
Constant Field Values

CACHE_KEY_REQUEST

public static final int CACHE_KEY_REQUEST
See Also:
Constant Field Values

CACHE_KEY_RESPONSE

public static final int CACHE_KEY_RESPONSE
See Also:
Constant Field Values

LAST_PROPERTY

public static final int LAST_PROPERTY
See Also:
Constant Field Values
Constructor Detail

PerfMonitor

public PerfMonitor()
Method Detail

startTimer

public abstract void startTimer(int timerId)
                         throws java.lang.IllegalArgumentException,
                                java.lang.IllegalArgumentException
Starts a timer with a given id.

Parameters:
timerId - the id of the timer to be started
Throws:
java.lang.IllegalArgumentException - thrown if the timer id is invalid
java.lang.IllegalStateException - thrown if the timer is running or has been stopped

finishTimer

public abstract void finishTimer(int timerId)
                          throws java.lang.IllegalArgumentException,
                                 java.lang.IllegalArgumentException
Stops a timer with a given id.

Parameters:
timerId - the id of the timer to be stopped
Throws:
java.lang.IllegalArgumentException - thrown if the timer id is invalid
java.lang.IllegalStateException - thrown if the timer has already been stopped or has not been started

setProperty

public abstract void setProperty(int propertyId,
                                 java.lang.String value)
                          throws java.lang.IllegalArgumentException
Sets a property with a given id to the value specified.

Parameters:
propertyId - the id of the property to be set
value - a String value to which the property is set
Throws:
java.lang.IllegalArgumentException - thrown if the property id is invalid

setProperty

public abstract void setProperty(int propertyId,
                                 long value)
                          throws java.lang.IllegalArgumentException
Sets a property with a given id to the value specified.

Parameters:
propertyId - the id of the property to be set
value - a long value to which the property is set
Throws:
java.lang.IllegalArgumentException - thrown if the property id is invalid

hasTimeoutElapsed

public abstract boolean hasTimeoutElapsed()
Used to find whether the execution time of the current request thread has exceeded the provider warning timeout.

Returns:
a boolean indicating whether or not the timeout has elapsed.

Oracle Fusion Middleware
Java API Reference for Oracle PDK Java
11g Release 1 (11.1.1)
E10691-01

Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.