## com.rbnb.api
Class DataRequest

    java.lang.Object
      com.rbnb.api.Rmap
          com.rbnb.api.DataRequest

All Implemented Interfaces:
  com.rbnb.utility.SortCompareInterface, com.rbnb.utility.SortInterface, Serializable, Cloneable

    public final class DataRequest

extends Rmap

Request for data from the DataTurbine.

The `DataRequest` class extends `Rmap` to provide additional fields and flags to support requests for data out of the DataTurbine.

Since:
  V2.0
See Also:
  Serialized Form
Author:
  Ian Brown
Version:
  11/06/2003

Field Summary
`static byte` `ABSOLUTE` absolute time reference.
`static byte` `AFTER` newest data starting after the specified time.
`static byte` `ALIGNED` aligned time reference.
`static byte` `ALL` get data from both `EXISTING` and `FUTURE` domains.
`static byte` `CONSOLIDATED` respond using a single consolidated `Rmap` hierarchy.
`static byte` `EQUAL` data at the time reference.
`static byte` `EXISTING` get data already in the ring buffers.
`static byte` `FRAMES` respond a single source frame `Rmap` hierarchy at a time.
`static byte` `FUTURE` get data that appears after the request is issued.
`static byte` `GREATER` data starting after the specified time reference.
`static byte` `GREATER_EQUAL` data starting at or after the specified time reference.
`static long` `INFINITE` infinite repetitions.
`static byte` `LESS` data starting before the specified time reference.
`static byte` `LESS_EQUAL` data starting at or before the specified time reference.
`static byte` `MODIFIED` newest data including at least some data after the specified time.
`static byte` `NEWEST` times are relative to that of the newest available data.
`static byte` `OLDEST` times are relative to that of the oldest available data.

Fields inherited from class com.rbnb.api.Rmap
`PATHDELIMITER`

Constructor Summary
`DataRequest()` Class constructor.
`DataRequest(com.rbnb.api.InputStream isI, com.rbnb.api.DataInputStream disI)` Class constructor to build an `DataRequest` by reading it from an input stream.
`DataRequest(Rmap otherI, com.rbnb.api.InputStream isI, com.rbnb.api.DataInputStream disI)` Class constructor to build an `DataRequest` by reading it from an input stream.
`DataRequest(String nameI)` Class constructor to build a `DataRequest` for the specified name.
`DataRequest(String nameI, TimeRange trangeI, TimeRange frangeI)` Class constructor to build a `DataRequest` from the specified values.
`DataRequest(String nameI, TimeRange trangeI, TimeRange frangeI, byte referenceI, byte relationshipI, byte domainI, long repetitionsI, double incrementI, boolean synchronizedI, byte modeI, boolean gapControlI)` Class constructor to build a `DataRequest` from the specified values.
`DataRequest(String nameI, TimeRange trangeI, TimeRange frangeI, byte referenceI, byte domainI, long repetitionsI, double incrementI, boolean synchronizedI, byte modeI)` Class constructor to build a `DataRequest` from the specified values.
`DataRequest(String nameI, TimeRange trangeI, TimeRange frangeI, byte referenceI, byte domainI, long repetitionsI, double incrementI, boolean synchronizedI, byte modeI, boolean gapControlI)` Class constructor to build a `DataRequest` from the specified values.

Method Summary
`void` `combineWith(DataRequest otherI)` Combines this `DataRequest` with the input one to produce a coherent set of flags.
`byte` `getDomain()` Gets the time domain.
`boolean` `getGapControl()` Gets the gap control flag.
`double` `getIncrement()` Gets the repitition increment.
`byte` `getMode()` Gets the response mode.
`long` `getNrepetitions()` Gets the number of repetitions.
`byte` `getReference()` Gets the time reference.
`byte` `getRelationship()` Gets the time relationship.
`boolean` `getSynchronized()` Gets the synchronized channels flag.
`void` `setDomain(byte domainI)` Sets the time domain.
`void` `setGapControl(boolean gapControlI)` Sets the gap control flag.
`void` `setMode(byte modeI)` Sets the response mode.
`void` `setReference(byte referenceI)` Sets the time reference.
`void` `setRelationship(byte relationshipI)` Sets the time relationship.
`void` `setRepetitions(long numberI, double incrementI)` Sets the number of repetitions and the increment for repetitions after the first.
`void` `setSynchronized(boolean synchronizedI)` Sets the synchronized channels flag.

Methods inherited from class com.rbnb.api.Rmap

`addChannel, addChild, addChildAt, addDataWithTimeReference, addMember, clone, collapse, compareNames, compareNames, compareNames, compareTo, compareTo, createFromName, extract, extract, extractFolders, extractFoldersAndChannels, extractNames, extractRmap, findChild, findDescendant, findMember, getChildAt, getChildren, getDblock, getFrange, getFullName, getMemberAt, getMembers, getName, getNchildren, getNmembers, getParent, getTrange, isImplemented, markLeaf, mergeWith, moveToBottom, moveToTop, nullify, removeChild, removeChildAt, removeMember, removeMemberAt, setDblock, setFrange, setName, setTrange, sortField, toNameHierarchy, toString, toString, xmlRegistration, xmlRegistration`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ABSOLUTE

    public static final byte ABSOLUTE

  absolute time reference.

  The request time values are used as is.

  Since:
    V2.0
  See Also:
    `AFTER`, `ALIGNED`, `MODIFIED`, `NEWEST`, `OLDEST`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### ALIGNED

    public static final byte ALIGNED

  aligned time reference.

  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `AFTER`, `MODIFIED`, `NEWEST`, `OLDEST`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### AFTER

    public static final byte AFTER

  newest data starting after the specified time.

  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `ALIGNED`, `MODIFIED`, `NEWEST`, `OLDEST`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### ALL

    public static final byte ALL

  get data from both `EXISTING` and `FUTURE` domains.

  Since:
    V2.0
  See Also:
    `EXISTING`, `FUTURE`, Constant Field Values
  Author:
    Ian Brown
  Version:
    03/01/2001

### CONSOLIDATED

    public static final byte CONSOLIDATED

  respond using a single consolidated `Rmap` hierarchy.

  Since:
    V2.0
  See Also:
    `FRAMES`, Constant Field Values
  Author:
    Ian Brown
  Version:
    03/01/2001

### EQUAL

    public static final byte EQUAL

  data at the time reference.

  Since:
    V2.2
  See Also:
    `GREATER`, `GREATER_EQUAL`, `LESS`, `LESS_EQUAL`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### EXISTING

    public static final byte EXISTING

  get data already in the ring buffers.

  Since:
    V2.0
  See Also:
    `ALL`, `FUTURE`, Constant Field Values
  Author:
    Ian Brown
  Version:
    03/01/2001

### FRAMES

    public static final byte FRAMES

  respond a single source frame `Rmap` hierarchy at a time.

  Since:
    V2.0
  See Also:
    `CONSOLIDATED`, Constant Field Values
  Author:
    Ian Brown
  Version:
    03/01/2001

### FUTURE

    public static final byte FUTURE

  get data that appears after the request is issued.

  Since:
    V2.0
  See Also:
    Constant Field Values
  Author:
    Ian Brown
  Version:
    03/01/2001

### GREATER

    public static final byte GREATER

  data starting after the specified time reference.

  Since:
    V2.2
  See Also:
    `EQUAL`, `GREATER_EQUAL`, `LESS`, `LESS_EQUAL`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### GREATER_EQUAL

    public static final byte GREATER_EQUAL

  data starting at or after the specified time reference.

  Since:
    V2.2
  See Also:
    `EQUAL`, `GREATER`, `LESS`, `LESS_EQUAL`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### LESS

    public static final byte LESS

  data starting before the specified time reference.

  Since:
    V2.2
  See Also:
    `EQUAL`, `GREATER`, `GREATER_EQUAL`, `LESS_EQUAL`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### LESS_EQUAL

    public static final byte LESS_EQUAL

  data starting at or before the specified time reference.

  Since:
    V2.2
  See Also:
    `EQUAL`, `GREATER`, `GREATER_EQUAL`, `LESS`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### MODIFIED

    public static final byte MODIFIED

  newest data including at least some data after the specified time.

  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `AFTER`, `ALIGNED`, `GREATER`, `GREATER_EQUAL`, `LESS`, `LESS_EQUAL`, `NEWEST`, `OLDEST`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### NEWEST

    public static final byte NEWEST

  times are relative to that of the newest available data.

  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `AFTER`, `ALIGNED`, `GREATER`, `GREATER_EQUAL`, `LESS`, `LESS_EQUAL`, `MODIFIED`, `OLDEST`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### OLDEST

    public static final byte OLDEST

  times are relative to that of the oldest available data.

  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `AFTER`, `ALIGNED`, `GREATER`, `GREATER_EQUAL`, `LESS`, `LESS_EQUAL`, `MODIFIED`, `NEWEST`, Constant Field Values
  Author:
    Ian Brown
  Version:
    11/06/2003

### INFINITE

    public static final long INFINITE

  infinite repetitions.

  Since:
    V2.0
  See Also:
    Constant Field Values
  Author:
    Ian Brown
  Version:
    04/03/2001

Constructor Detail

### DataRequest

    public DataRequest()

  Class constructor.

  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    06/07/2001

### DataRequest

    public DataRequest(com.rbnb.api.InputStream isI,
                       com.rbnb.api.DataInputStream disI)
                throws AddressException,
                       SerializeException,
                       EOFException,
                       IOException,
                       InterruptedException

  Class constructor to build an `DataRequest` by reading it from an input stream.

  Parameters:
    `isI` - the input stream.
    `disI` - the data input stream.
  Throws:
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization. For example, a missing bracket.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error reading the input stream.
    `InterruptedException` - thrown if the read is interrupted.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    07/31/2001

### DataRequest

    public DataRequest(Rmap otherI,
                       com.rbnb.api.InputStream isI,
                       com.rbnb.api.DataInputStream disI)
                throws AddressException,
                       SerializeException,
                       EOFException,
                       IOException,
                       InterruptedException

  Class constructor to build an `DataRequest` by reading it from an input stream.

  This constructor fills in unread fields from the input `Rmap`.

  Parameters:
    `otherI` - the other `DataRequest` as an `Rmap`.
    `isI` - the input stream.
    `disI` - the data input stream.
  Throws:
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization. For example, a missing bracket.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error reading the input stream.
    `InterruptedException` - thrown if the read is interrupted.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    07/31/2001

### DataRequest

    public DataRequest(String nameI)
                throws AddressException,
                       SerializeException,
                       EOFException,
                       InterruptedIOException,
                       IOException,
                       InterruptedException

  Class constructor to build a `DataRequest` for the specified name.

  Parameters:
    `nameI` - the name of the `Rmap`.
  Throws:
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization. For example, a missing bracket.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error reading the input stream.
    `InterruptedException` - thrown if the read is interrupted.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    06/07/2001

### DataRequest

    public DataRequest(String nameI,
                       TimeRange trangeI,
                       TimeRange frangeI)
                throws AddressException,
                       SerializeException,
                       EOFException,
                       InterruptedIOException,
                       IOException,
                       InterruptedException

  Class constructor to build a `DataRequest` from the specified values.

  Parameters:
    `nameI` - the name of the `Rmap`.
    `trangeI` - the `TimeRange`.
    `frangeI` - the frame index `TimeRange`.
  Throws:
    `IllegalArgumentException` - thrown if `repetitionsI` is negative or zero.
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error during I/O.
    `IllegalArgumentException` - thrown if `repetitionsI` is negative or zero.
    `InterruptedException` - thrown if the operation is interrupted.
  Since:
    V2.0
  See Also:
    `DataRequest()`
  Author:
    Ian Brown
  Version:
    06/04/2001

### DataRequest

    public DataRequest(String nameI,
                       TimeRange trangeI,
                       TimeRange frangeI,
                       byte referenceI,
                       byte domainI,
                       long repetitionsI,
                       double incrementI,
                       boolean synchronizedI,
                       byte modeI)
                throws AddressException,
                       SerializeException,
                       EOFException,
                       InterruptedIOException,
                       IOException,
                       InterruptedException

  Class constructor to build a `DataRequest` from the specified values.

  Parameters:
    `nameI` - the name of the `Rmap`.
    `trangeI` - the `TimeRange`.
    `frangeI` - the frame index `TimeRange`.
    `referenceI` - the time reference.
    `domainI` - the time domain.
    `repetitionsI` - the number of repetitions.
    `incrementI` - the repitition increment.
    `synchronizedI` - synchronize channels?
    `modeI` - the response mode.
  Throws:
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error during I/O.
    `IllegalArgumentException` - thrown if `repetitionsI` is negative or zero.
    `InterruptedException` - thrown if the operation is interrupted.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    06/07/2001

### DataRequest

    public DataRequest(String nameI,
                       TimeRange trangeI,
                       TimeRange frangeI,
                       byte referenceI,
                       byte domainI,
                       long repetitionsI,
                       double incrementI,
                       boolean synchronizedI,
                       byte modeI,
                       boolean gapControlI)
                throws AddressException,
                       SerializeException,
                       EOFException,
                       InterruptedIOException,
                       IOException,
                       InterruptedException

  Class constructor to build a `DataRequest` from the specified values.

  Parameters:
    `nameI` - the name of the `Rmap`.
    `trangeI` - the `TimeRange`.
    `frangeI` - the frame index `TimeRange`.
    `referenceI` - the time reference.
    `domainI` - the time domain.
    `repetitionsI` - the number of repetitions.
    `incrementI` - the repitition increment.
    `synchronizedI` - synchronize channels?
    `modeI` - the response mode.
    `gapControlI` - control when gaps can occur?
  Throws:
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error during I/O.
    `IllegalArgumentException` - thrown if `repetitionsI` is negative or zero.
    `InterruptedException` - thrown if the operation is interrupted.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    11/06/2003

### DataRequest

    public DataRequest(String nameI,
                       TimeRange trangeI,
                       TimeRange frangeI,
                       byte referenceI,
                       byte relationshipI,
                       byte domainI,
                       long repetitionsI,
                       double incrementI,
                       boolean synchronizedI,
                       byte modeI,
                       boolean gapControlI)
                throws AddressException,
                       SerializeException,
                       EOFException,
                       InterruptedIOException,
                       IOException,
                       InterruptedException

  Class constructor to build a `DataRequest` from the specified values.

  Parameters:
    `nameI` - the name of the `Rmap`.
    `trangeI` - the `TimeRange`.
    `frangeI` - the frame index `TimeRange`.
    `referenceI` - the time reference.
    `relationshipI` - the time relationship.
    `domainI` - the time domain.
    `repetitionsI` - the number of repetitions.
    `incrementI` - the repitition increment.
    `synchronizedI` - synchronize channels?
    `modeI` - the response mode.
    `gapControlI` - control when gaps can occur?
  Throws:
    `AddressException` - thrown if there is a problem with an address.
    `SerializeException` - thrown if there is a problem with the serialization.
    `EOFException` - thrown if the end of the input stream is reached.
    `InterruptedIOException` - thrown if this operation is interrupted during I/O.
    `IOException` - thrown if there is an error during I/O.
    `IllegalArgumentException` - thrown if `repetitionsI` is negative or zero.
    `InterruptedException` - thrown if the operation is interrupted.
  Since:
    V2.2
  Author:
    Ian Brown
  Version:
    11/06/2003

Method Detail

### getDomain

    public final byte getDomain()

  Gets the time domain.

  Returns:
    the time domain.
  Since:
    V2.0
  See Also:
    `ALL`, `EXISTING`, `FUTURE`, `setDomain(byte)`
  Author:
    Ian Brown
  Version:
    05/22/2001

### combineWith

    public final void combineWith(DataRequest otherI)

  Combines this `DataRequest` with the input one to produce a coherent set of flags.

  Parameters:
    `otherI` - the other `DataRequest`.
  Since:
    V2.0
  Author:
    Ian Brown
  Version:
    11/06/2003

### getGapControl

    public final boolean getGapControl()

  Gets the gap control flag.

  Returns:
    control gaps?
  Since:
    V2.0
  See Also:
    `setGapControl(boolean)`
  Author:
    Ian Brown
  Version:
    06/07/2001

### getIncrement

    public final double getIncrement()

  Gets the repitition increment.

  Returns:
    the repitition increment.
  Since:
    V2.0
  See Also:
    `getNrepetitions()`, `setRepetitions(long,double)`
  Author:
    Ian Brown
  Version:
    05/22/2001

### getMode

    public final byte getMode()

  Gets the response mode.

  Returns:
    the response mode.
  Since:
    V2.0
  See Also:
    `CONSOLIDATED`, `FRAMES`, `setMode(byte)`
  Author:
    Ian Brown
  Version:
    05/22/2001

### getNrepetitions

    public final long getNrepetitions()

  Gets the number of repetitions.

  Returns:
    the number of repetitions.
  Since:
    V2.0
  See Also:
    `getIncrement()`, `setRepetitions(long,double)`
  Author:
    Ian Brown
  Version:
    05/22/2001

### getReference

    public final byte getReference()

  Gets the time reference.

  Returns:
    the time reference.
  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `AFTER`, `ALIGNED`, `MODIFIED`, `NEWEST`, `OLDEST`, `setReference(byte)`
  Author:
    Ian Brown
  Version:
    11/06/2003

### getRelationship

    public final byte getRelationship()

  Gets the time relationship.

  Returns:
    the relationship to the time reference.
  Since:
    V2.2
  See Also:
    `EQUAL`, `GREATER`, `GREATER_EQUAL`, `LESS`, `LESS_EQUAL`, `setRelationship(byte)`
  Author:
    Ian Brown
  Version:
    11/06/2003

### getSynchronized

    public final boolean getSynchronized()

  Gets the synchronized channels flag.

  Returns:
    the synchronized channels flag.
  Since:
    V2.0
  See Also:
    `setSynchronized(boolean)`
  Author:
    Ian Brown
  Version:
    05/22/2001

### setDomain

    public final void setDomain(byte domainI)

  Sets the time domain.

  Parameters:
    `domainI` - the time domain.
  Since:
    V2.0
  See Also:
    `ALL`, `EXISTING`, `FUTURE`, `getDomain()`
  Author:
    Ian Brown
  Version:
    05/22/2001

### setGapControl

    public final void setGapControl(boolean gapControlI)

  Sets the gap control flag.

  When gap control is on, the server waits for acknowledgement of each repetition of each source's data to be received by the sink before starting the next repetition. When used in conjunction with `reference=OLDEST` or `NEWEST` and `domain=FUTURE` or `ALL`, this allows the client to control when gaps occur in the data it receives.

  When gap control is off, the server runs as fast as it can. Gaps occur between repetitions, but their timing is determined entirely by when buffers (such as TCP socket buffers) fill up.

  Parameters:
    `gapControlI` - turn on gap control?
  Since:
    V2.0
  See Also:
    `getGapControl()`
  Author:
    Ian Brown
  Version:
    06/07/2001

### setMode

    public final void setMode(byte modeI)

  Sets the response mode.

  Parameters:
    `modeI` - the response mode.
  Since:
    V2.0
  See Also:
    `CONSOLIDATED`, `FRAMES`, `getMode()`
  Author:
    Ian Brown
  Version:
    05/22/2001

### setRepetitions

    public final void setRepetitions(long numberI,
                                     double incrementI)

  Sets the number of repetitions and the increment for repetitions after the first.

  When the increment is 0, the request is repeated unchanged.

  When the increment is non-zero, repetitions after the first are essentially requests for `ABSOLUTE` times.

  Parameters:
    `numberI` - the number of repetitions.
    `incrementI` - the increment between repetitions.
  Throws:
    `IllegalArgumentException` - thrown if `repetitionsI` is negative or zero.
  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `getIncrement()`, `getNrepetitions()`
  Author:
    Ian Brown
  Version:
    05/22/2001

### setReference

    public final void setReference(byte referenceI)

  Sets the time reference.

  Parameters:
    `referenceI` - the time reference.
  Since:
    V2.0
  See Also:
    `ABSOLUTE`, `AFTER`, `ALIGNED`, `MODIFIED`, `NEWEST`, `OLDEST`, `setReference(byte)`
  Author:
    Ian Brown
  Version:
    11/06/2003

### setRelationship

    public final void setRelationship(byte relationshipI)

  Sets the time relationship.

  Parameters:
    `relationshipI` - the relationship to the time reference.
  Since:
    V2.2
  See Also:
    `EQUAL`, `getRelationship()`, `GREATER`, `GREATER_EQUAL`, `LESS`, `LESS_EQUAL`
  Author:
    Ian Brown
  Version:
    11/06/2003

### setSynchronized

    public final void setSynchronized(boolean synchronizedI)

  Sets the synchronized channels flag.

  Parameters:
    `synchronizedI` - synchronize the channels?
  Since:
    V2.0
  See Also:
    `getSynchronized()`
  Author:
    Ian Brown
  Version:
    05/22/2001