Rio Project 4.2 API Documentation



org.rioproject.watch
Interface WatchDataSource

All Superinterfaces:
Remote
All Known Implementing Classes:
WatchDataSourceImpl

public interface WatchDataSource
extends Remote

The WatchDataSource interface defines the semantics for a Watch to store Calculable records


Method Summary
 void addCalculable(Calculable calculable)
          Add a Calculable record to the Calculable history
 boolean addWatchDataReplicator(WatchDataReplicator replicator)
          Add a WatchDataReplicator,
 void clear()
          Clears the history
 void close()
          Closes the watch data source and unexports it from the runtime
 Calculable[] getCalculable()
          Get all Calculable records from the Calculable history
 Calculable[] getCalculable(long from, long to)
          Get Calculable records from the Calculable history for the specified time range
 int getCurrentSize()
          Get the current size for the Calculable history
 String getID()
          Get the ID for the WatchDataSource
 Calculable getLastCalculable()
          Gets the last Calculable from the history
 int getMaxSize()
          Get the maximum size for the Calculable history
 ThresholdValues getThresholdValues()
          Getter for property thresholdValues.
 String getView()
          Getter for property view.
 void initialize()
          Initialize the WatchDataSource
 boolean removeWatchDataReplicator(WatchDataReplicator replicator)
          Remove a WatchDataReplicator
 void setConfiguration(Configuration config)
          Set the WatchDataSource configuration
 void setID(String id)
          Set the ID for the WatchDataSource
 void setMaxSize(int size)
          Set the maximum size for the Calculable history
 void setThresholdValues(ThresholdValues tValues)
          Set the ThresholdValues
 void setView(String view)
          Setter for property view.
 

Method Detail

setConfiguration

void setConfiguration(Configuration config)
                      throws RemoteException
Set the WatchDataSource configuration

Parameters:
config - The configuration
Throws:
RemoteException - If communication errors occur

setID

void setID(String id)
           throws RemoteException
Set the ID for the WatchDataSource

Parameters:
id - The identifier for the WatchDataSource
Throws:
RemoteException - If communication errors occur

getID

String getID()
             throws RemoteException
Get the ID for the WatchDataSource

Returns:
The identifier for the WatchDataSource
Throws:
RemoteException - If communication errors occur

initialize

void initialize()
                throws RemoteException
Initialize the WatchDataSource

Throws:
RemoteException - if the WatchDataSource cannot be exported

setMaxSize

void setMaxSize(int size)
                throws RemoteException
Set the maximum size for the Calculable history

Parameters:
size - The maximum size for the Calculable history
Throws:
RemoteException - If communication errors occur

getMaxSize

int getMaxSize()
               throws RemoteException
Get the maximum size for the Calculable history

Returns:
The maximum size for the Calculable history
Throws:
RemoteException - If communication errors occur

clear

void clear()
           throws RemoteException
Clears the history

Throws:
RemoteException - If communication errors occur

getCurrentSize

int getCurrentSize()
                   throws RemoteException
Get the current size for the Calculable history

Returns:
The current size for the Calculable history
Throws:
RemoteException - If communication errors occur

addCalculable

void addCalculable(Calculable calculable)
                   throws RemoteException
Add a Calculable record to the Calculable history

Parameters:
calculable - The Calculable record
Throws:
RemoteException - If communication errors occur

getCalculable

Calculable[] getCalculable()
                           throws RemoteException
Get all Calculable records from the Calculable history

Returns:
An array of Calculable records from the Calculable history. If there are no Calculable records in the history, a zero-length array will be returned
Throws:
RemoteException - If communication errors occur

getCalculable

Calculable[] getCalculable(long from,
                           long to)
                           throws RemoteException
Get Calculable records from the Calculable history for the specified time range

Parameters:
from - The start time
to - The end time
Returns:
An array of Calculable records from the Calculable history within the provided time range. If there are no Calculable records in the range, a zero-length array will be returned
Throws:
RemoteException - If communication errors occur

getLastCalculable

Calculable getLastCalculable()
                             throws RemoteException
Gets the last Calculable from the history

Returns:
The last Calculable in the history
Throws:
RemoteException - If communication errors occur

getThresholdValues

ThresholdValues getThresholdValues()
                                   throws RemoteException
Getter for property thresholdValues.

Returns:
Value of property thresholdValues.
Throws:
RemoteException - If communication errors occur

setThresholdValues

void setThresholdValues(ThresholdValues tValues)
                        throws RemoteException
Set the ThresholdValues

Parameters:
tValues - The ThresholdValues to set
Throws:
RemoteException - If communication errors occur

close

void close()
           throws RemoteException
Closes the watch data source and unexports it from the runtime

Throws:
RemoteException - If communication errors occur

setView

void setView(String view)
             throws RemoteException
Setter for property view.

Parameters:
view - The view class name, suitable for Class.forName
Throws:
RemoteException - If communication errors occur

getView

String getView()
               throws RemoteException
Getter for property view.

Returns:
The Value of the property view
Throws:
RemoteException - If communication errors occur

addWatchDataReplicator

boolean addWatchDataReplicator(WatchDataReplicator replicator)
                               throws RemoteException
Add a WatchDataReplicator,

Parameters:
replicator - The WatchDataReplicator to add.
Returns:
true if the WatchDataReplicator was added. If the WatchDataReplicator has already been added, it will not be added again.
Throws:
RemoteException - If communication errors occur

removeWatchDataReplicator

boolean removeWatchDataReplicator(WatchDataReplicator replicator)
                                  throws RemoteException
Remove a WatchDataReplicator

Parameters:
replicator - The WatchDataReplicator to remove.
Returns:
true if the WatchDataReplicator was removed
Throws:
RemoteException - If communication errors occur

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.