Package org.jini.rio.watch
Interface WatchDataSource
- All Superinterfaces:
Remote
The WatchDataSource interface defines the semantics for a Watch to store Calculable records
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCalculable(Calculable calculable) Add a Calculable record to the Calculable historyvoidclear()Clears the historyvoidclose()Closes the watch data source and unexports it from the runtimeGet all Calculable records from the Calculable historygetCalculable(int offset, int length) Get Calculable records from the Calculable history for the specified rangegetCalculable(String id) Get Calculable records from the Calculable historygetCalculable(String id, int offset, int length) Get Calculable records from the Calculable historyintGet the current size for the Caclulable historygetID()Get the ID for the WatchDataSourceGets the last Calculable from the historyGets the last Calculable from the historyintGet the offsetintgetSize()Get the maximum size for the Calculable historyGetter for property thresholdValues.getView()Getter for property view.voidsetSize(int size) Set the maximum size for the Calculable historyvoidsetThresholdValues(ThresholdValues tValues) Set the ThresholdValuesvoidSetter for property view.
-
Method Details
-
getID
Get the ID for the WatchDataSource- Throws:
RemoteException
-
getOffset
Get the offset- Throws:
RemoteException
-
setSize
Set the maximum size for the Calculable history- Parameters:
size- The maximum size for the Calculable history- Throws:
RemoteException
-
getSize
Get the maximum size for the Calculable history- Returns:
- The maximum size for the Calculable history
- Throws:
RemoteException
-
clear
Clears the history- Throws:
RemoteException
-
getCurrentSize
Get the current size for the Caclulable history- Returns:
- The current size for the Caclulable history
- Throws:
RemoteException
-
addCalculable
Add a Calculable record to the Calculable history- Parameters:
calculable- The Calculable record- Throws:
RemoteException
-
getCalculable
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
-
getCalculable
Get Calculable records from the Calculable history- Parameters:
id- The Watch identifier to match- Returns:
- Calculable[] An array of Calculable records from the Calculable history that match the Watch id. If there are no Calculable records in the history that maych the Watch id, a zero-length array will be returned
- Throws:
RemoteException
-
getCalculable
Get Calculable records from the Calculable history for the specified range- Parameters:
offset- The index of the first record to fetchlength- The number of records to return- Returns:
- An array of Calculable records from the Calculable history within the provided range. If there are no Calculable records in the range, a zero-length array will be returned
- Throws:
RemoteException
-
getCalculable
Get Calculable records from the Calculable history- Parameters:
id- The Watch identifier to matchoffset- The index of the first record to matchlength- The number of records to compare- Returns:
- An array of Calculable records from the Calculable history that match the Watch id within the provided range. If there are no Calculable records in the range that match the Watch ID, a zero-length array will be returned
- Throws:
RemoteException
-
getLastCalculable
Gets the last Calculable from the history- Returns:
- The last Calculable in the history
- Throws:
RemoteException
-
getLastCalculable
Gets the last Calculable from the history- Parameters:
id- The Watch identifier to match- Returns:
- The last Calculable in the history that matches the Watch ID
- Throws:
RemoteException
-
getThresholdValues
Getter for property thresholdValues.- Returns:
- Value of property thresholdValues.
- Throws:
RemoteException
-
setThresholdValues
Set the ThresholdValues- Throws:
RemoteException
-
close
Closes the watch data source and unexports it from the runtime- Throws:
RemoteException
-
setView
Setter for property view.- Parameters:
view- The view class name, suitable for Class.forName- Throws:
RemoteException
-
getView
Getter for property view.- Returns:
- The Value of the property view
- Throws:
RemoteException
-