Package org.drools.ruleunits.api

## Interface DataStore<T>

- Type Parameters:
    `T` - The type of objects managed by this DataSource.
  All Superinterfaces:
    `DataSource<T>`

      public interface DataStore<T>
      extends DataSource<T>

  A `DataSource` of mutable data.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.drools.ruleunits.api.DataSource

      `DataSource.Factory, DataSource.FactoryHolder`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DataHandle` | `add​(T object)` | Add an object to this DataStore.
    `void` | `remove​(DataHandle handle)` | Deletes the fact for which the given `DataHandle` was assigned.
    `void` | `remove​(T object)` | Deletes a fact from this DataStore.
    `void` | `update​(DataHandle handle, T object)` | Updates the fact for which the given `DataHandle` was assigned with the new fact set as the second parameter in this method.

    - ### Methods inherited from interface org.drools.ruleunits.api.DataSource

      `subscribe`

- - ### Method Detail

    - #### add

          DataHandle add​(T object)

      Add an object to this DataStore.
      Returns:
        The `DataHandle` to be further modified

    - #### update

          void update​(DataHandle handle,
                      T object)

      Updates the fact for which the given `DataHandle` was assigned with the new fact set as the second parameter in this method. It is also possible to optionally specify the set of properties that have been modified.
      Parameters:
        `handle` - the FactHandle for the fact to be updated.
        `object` - the new value for the fact being updated.

    - #### remove

          void remove​(DataHandle handle)

      Deletes the fact for which the given `DataHandle` was assigned.
      Parameters:
        `handle` - the handle whose fact is to be retracted.

    - #### remove

          void remove​(T object)

      Deletes a fact from this DataStore.