Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.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
`void` | `clear()` Clears the history
`void` | `clear(String id)` Clears the history for a specific Watch identifier
`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(int offset, int num)` Get Calculable records from the Calculable history for the specified range
`Calculable[]` | `getCalculable(long from, long to)` Get Calculable records from the Calculable history for the specified time range
`Calculable[]` | `getCalculable(String id)` Get Calculable records from the Calculable history
`Calculable[]` | `getCalculable(String id, int offset, int num)` Get Calculable records from the Calculable history
`Calculable[]` | `getCalculable(String id, 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
`Calculable` | `getLastCalculable(String id)` Gets the last Calculable from the history
`int` | `getMaxSize()` Get the maximum size for the Calculable history
`int` | `getOffset()` Get the offset
`ThresholdValues` | `getThresholdValues()` Getter for property thresholdValues.
`String` | `getView()` Getter for property view.
`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

### getID

    String getID()
                 throws RemoteException

  Get the ID for the WatchDataSource

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

### getOffset

    int getOffset()
                  throws RemoteException

  Get the offset

  Returns:
    The offset to begining of the active history
  Throws:
    `RemoteException` - If communication errors happen

### 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 happen

### 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 happen

### clear

    void clear()
               throws RemoteException

  Clears the history

  Throws:
    `RemoteException` - If communication errors happen

### clear

    void clear(String id)
               throws RemoteException

  Clears the history for a specific Watch identifier

  Parameters:
    `id` - The Watch identifier
  Throws:
    `RemoteException` - If communication errors happen

### 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 happen

### 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 happen

### 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 happen

### getCalculable

    Calculable[] getCalculable(String id)
                               throws RemoteException

  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` - If communication errors happen

### getCalculable

    Calculable[] getCalculable(int offset,
                               int num)
                               throws RemoteException

  Get Calculable records from the Calculable history for the specified range

  Parameters:
    `offset` - The index of the first record to fetch
    `num` - 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` - If communication errors happen

### 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 happen

### getCalculable

    Calculable[] getCalculable(String id,
                               long from,
                               long to)
                               throws RemoteException

  Get Calculable records from the Calculable history for the specified time range

  Parameters:
    `id` - The Watch identifier to match
    `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 happen

### getCalculable

    Calculable[] getCalculable(String id,
                               int offset,
                               int num)
                               throws RemoteException

  Get Calculable records from the Calculable history

  Parameters:
    `id` - The Watch identifier to match
    `offset` - The index of the first record to match
    `num` - 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` - If communication errors happen

### getLastCalculable

    Calculable getLastCalculable()
                                 throws RemoteException

  Gets the last Calculable from the history

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

### getLastCalculable

    Calculable getLastCalculable(String id)
                                 throws RemoteException

  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` - If communication errors happen

### getThresholdValues

    ThresholdValues getThresholdValues()
                                       throws RemoteException

  Getter for property thresholdValues.

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

### setThresholdValues

    void setThresholdValues(ThresholdValues tValues)
                            throws RemoteException

  Set the ThresholdValues

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

### close

    void close()
               throws RemoteException

  Closes the watch data source and unexports it from the runtime

  Throws:
    `RemoteException` - If communication errors happen

### 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 happen

### getView

    String getView()
                   throws RemoteException

  Getter for property view.

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.