Interface IAggregatedStore<Q>

A StreamingStore allows data lookup and insertion to happen in parallel. Concretely, this means that match() calls happening before import() calls, will still consider those triples that are inserted later, which is done by keeping the response streams of match() open. Only when the end() method is invoked, all response streams will close, and the StreamingStore will be considered immutable.

WARNING: end() MUST be called at some point, otherwise all match streams will remain unended.

interface IAggregatedStore<Q> {
    addIteratorCreatedListener: ((listener) => void);
    containedSources: Set<string>;
    end: (() => void);
    hasRunningIterators: (() => boolean);
    match: ((subject?, predicate?, object?, graph?) => AsyncIterator<Q>);
    removeIteratorCreatedListener: ((listener) => void);
    setBaseMetadata: ((metadata, updateStates) => void);
    started: boolean;
    import(stream): EventEmitter<DefaultEventMap>;
}

Type Parameters

  • Q extends RDF.BaseQuad = RDF.Quad

Hierarchy

  • Source<Q>
  • Sink<RDF.Stream<Q>, EventEmitter>
    • IAggregatedStore

Properties

addIteratorCreatedListener: ((listener) => void)

Register a listener that will be invoked when a new iterator is returned from match().

Type declaration

    • (listener): void
    • Parameters

      • listener: (() => void)

        A listener.

          • (): void
          • Returns void

      Returns void

containedSources: Set<string>

The sources that are indexed in this store.

end: (() => void)

Mark this store as ended.

This will make sure that all running and future match calls will end, and all next import calls to this store will throw an error.

Type declaration

    • (): void
    • Returns void

hasRunningIterators: (() => boolean)

If iterators created during the match call are still running.

Type declaration

    • (): boolean
    • Returns boolean

match: ((subject?, predicate?, object?, graph?) => AsyncIterator<Q>)

Type declaration

    • (subject?, predicate?, object?, graph?): AsyncIterator<Q>
    • Parameters

      • Optional subject: null | Term
      • Optional predicate: null | Term
      • Optional object: null | Term
      • Optional graph: null | Term

      Returns AsyncIterator<Q>

removeIteratorCreatedListener: ((listener) => void)

Remove the given iterator creation listener.

Type declaration

    • (listener): void
    • Parameters

      • listener: (() => void)

        A listener.

          • (): void
          • Returns void

      Returns void

setBaseMetadata: ((metadata, updateStates) => void)

Update the metadata of the base iterator, from which the aggregated store is being populated.

Type declaration

    • (metadata, updateStates): void
    • Parameters

      Returns void

started: boolean

If this aggregated has started processing.

Methods

  • Consumes the given stream.

    The end and error events are used like described in the Stream interface. Depending on the use case, subtypes of EventEmitter or Stream are used.

    Parameters

    • stream: Stream<Q>

      The stream that will be consumed.

    Returns EventEmitter<DefaultEventMap>

    The resulting event emitter.

    See

    Stream