org.eclipse.january.dataset

## Interface IDynamicShape

- All Known Subinterfaces:
    IDatasetConnector, IDynamicDataset, ILazyWriteableDataset
  All Known Implementing Classes:
    LazyDynamicDataset, LazyWriteableDataset

      public interface IDynamicShape

  This interface is intended for data sources that change shape dynamically. Examples: 1. An image stream from a camera encoded which entire image, changes periodically. 2. An HDF5 dataset which entire shape changes as data is added.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `UNLIMITED` Denotes an unlimited dimension in maximum shape

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDataListener(IDataListener l)` Add a listener which will be fired when aspects of the data change for instance shape or content.
    `void` | `fireDataListeners()` Alert any registered listeners
    `ILazyDataset` | `getDataset()`
    `int[]` | `getMaxShape()`
    `boolean` | `refreshShape()` Force the shape to be re-read from file, if possible
    `void` | `removeDataListener(IDataListener l)` Remove a listener which will be fired when aspects of the data change for instance shape or content.
    `boolean` | `resize(int... newShape)` Change shape
    `void` | `setMaxShape(int... maxShape)` Set maximum shape
    `void` | `startUpdateChecker(int milliseconds, IDatasetChangeChecker checker)` Starts a periodic checker to see if dataset has changed in some manner.

- - ### Field Detail

    - #### UNLIMITED

          static final int UNLIMITED

      Denotes an unlimited dimension in maximum shape
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getDataset

          ILazyDataset getDataset()

      Returns:
        dataset associated with shape

    - #### resize

          boolean resize(int... newShape)

      Change shape
      Parameters:
        `newShape` -
      Returns:
        true if shape has changed
      Throws:
        `IllegalArgumentException` - if new shape exceeds maximum shape or is of different rank
        `UnsupportedOperationException` - if used on a view

    - #### getMaxShape

          int[] getMaxShape()

      Returns:
        maximum shape (can be null)

    - #### setMaxShape

          void setMaxShape(int... maxShape)

      Set maximum shape
      Parameters:
        `maxShape` - maximum shape

    - #### startUpdateChecker

          void startUpdateChecker(int milliseconds,
                                  IDatasetChangeChecker checker)

      Starts a periodic checker to see if dataset has changed in some manner. If any potential changes are detected after the period has finished then registered listeners are alerted. A period of 0 or less will stop any existing checker.
      Parameters:
        `milliseconds` - period between checks in milliseconds
        `checker` - can be null for default implementation of alerting listeners unconditionally

    - #### refreshShape

          boolean refreshShape()

      Force the shape to be re-read from file, if possible
      Returns:
        true if shape has changed

    - #### addDataListener

          void addDataListener(IDataListener l)

      Add a listener which will be fired when aspects of the data change for instance shape or content.
      Parameters:
        `l` -

    - #### removeDataListener

          void removeDataListener(IDataListener l)

      Remove a listener which will be fired when aspects of the data change for instance shape or content.
      Parameters:
        `l` -

    - #### fireDataListeners

          void fireDataListeners()

      Alert any registered listeners

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