org.eclipse.january.dataset

## Interface IDatasetConnector

- All Superinterfaces:
    IDynamicShape, IFileConnection

      public interface IDatasetConnector
      extends IFileConnection, IDynamicShape

  A dataset connector contains a lazy dataset which exists in a remote location. It uses a connection to the DataServer to provide the implementation of the slicing required remotely. You may also listen to data changing in the dataset

- - ### Field Summary

    - ### Fields inherited from interface org.eclipse.january.dataset.IDynamicShape

      `UNLIMITED`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `connect()` Same as calling connect(500, TimeUnit.MILLISECOND) Cannot will connect with the DataServer to start listening to any updates to the file should it be written in the remote file system.
    `String` | `connect(long time, TimeUnit unit)` Cannot will connect with the DataServer to start listening to any updates to the file should it be written in the remote file system.
    `void` | `disconnect()` Stops listening to the dataset changing and disconnects from the server.
    `String` | `getDatasetName()` The dataset location/name in the file
    `boolean` | `isWritingExpected()`
    `void` | `setDatasetName(String datasetName)` The dataset location/name in the file
    `void` | `setWritingExpected(boolean expectWrite)` If set to true the DataServer will not cache the dataset.

    - ### Methods inherited from interface org.eclipse.january.dataset.IFileConnection

      `getPath, setPath`

    - ### Methods inherited from interface org.eclipse.january.dataset.IDynamicShape

      `addDataListener, fireDataListeners, getDataset, getMaxShape, refreshShape, removeDataListener, resize, setMaxShape, startUpdateChecker`

- - ### Method Detail

    - #### getDatasetName

          String getDatasetName()

      The dataset location/name in the file
      Returns:
        Dataset name

    - #### setDatasetName

          void setDatasetName(String datasetName)

      The dataset location/name in the file
      Parameters:
        `datasetName` -

    - #### setWritingExpected

          void setWritingExpected(boolean expectWrite)

      If set to true the DataServer will not cache the dataset. If left as false: if the data server can figure out that the file is writing, it will reshape. However it cannot always determine this depending on the file and what is writing to it (SWMR can write without changing date stamp for instance) Setting this boolean ensures that a given path, never will cache on the data server. Default value is false for MJPG streams and true for standard remote datasets.
      Parameters:
        `expectWrite` -

    - #### isWritingExpected

          boolean isWritingExpected()

      Returns:
        true if the remote dataset has been warned that writing is expected.

    - #### connect

          String connect()
                         throws DatasetException

      Same as calling connect(500, TimeUnit.MILLISECOND) Cannot will connect with the DataServer to start listening to any updates to the file should it be written in the remote file system. When connect it called, the remote file must exist and the dataset properties are read. These properties must not change in the file while you are connected. For instance if the file is ints when you connect, it must not change data class.
      Returns:
        the name of the thread started to run the connection or null if each event is driven from the event thread of the service (for instance web sockets provide the thread and this runs the connection)
      Throws:
        `DatasetException`

    - #### connect

          String connect(long time,
                       TimeUnit unit)
                         throws DatasetException

      Cannot will connect with the DataServer to start listening to any updates to the file should it be written in the remote file system. When connect it called, the remote file must exist and the dataset properties are read. These properties must not change in the file while you are connected. For instance if the file is ints when you connect, it must not change data class.
      Parameters:
        `time` -
        `unit` -
      Returns:
        the name of the thread started to run the connection or null if each event is driven from the event thread of the service (for instance web sockets provide the thread and this runs the connection)
      Throws:
        `DatasetException`

    - #### disconnect

          void disconnect()
                          throws DatasetException

      Stops listening to the dataset changing and disconnects from the server. A remote dataset may be connected and disconnected multiple times.
      Throws:
        `DatasetException`

Copyright © 2014–2017 Eclipse Foundation. All rights reserved.