org.hackystat.telemetry.analyzer.function.impl
Class IdempotentFunction

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.function.TelemetryFunction
      extended by org.hackystat.telemetry.analyzer.function.impl.IdempotentFunction

public class IdempotentFunction
extends TelemetryFunction

Accepts either a number or a telemetry stream and returns it.

Author:
(Cedric) Qin ZHANG, Philip Johnson

Constructor Summary
IdempotentFunction()
          Constructs this instance.
 
Method Summary
 java.lang.Object compute(java.lang.Object[] parameters)
          Invokes the function.
 
Methods inherited from class org.hackystat.telemetry.analyzer.function.TelemetryFunction
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdempotentFunction

public IdempotentFunction()
Constructs this instance.

Method Detail

compute

public java.lang.Object compute(java.lang.Object[] parameters)
                         throws TelemetryFunctionException
Description copied from class: TelemetryFunction
Invokes the function. Note that multiple thread might call this method at the same time. The implementation must be thread-safe.

Specified by:
compute in class TelemetryFunction
Parameters:
parameters - An array of 1 object of type either Number or TelemetryStreamCollection.
Returns:
Either an instance of Number or TelemetryStreamCollection.
Throws:
TelemetryFunctionException - If anything is wrong.