This implements a directory folder whose content is cached and only updated when needed.

This cache takes its input values from an iterator over data stored in a channel.

This class takes care of those things:

  • cache the values that the iterator returns, so that the iterator only has to run when values are outdated
  • Build the EasyDirectoryContent that represents the cached iterator values as directories (createDirectory)
  • Forward the content of the sub-folders to other directory implementations (setSubDirectory)

The sub-classes that use this abstract class have to do the following:

  • provide the directory content as iterator (by implementing the valueIterator)
  • define the parameters that shall be forwarded to the next folder level (by setting the SubDirectoryParamsT parameter)
  • define how to convert from the cached/iterator value to the parameters that shall be forwarded to the next folder level (by implementing the transformCacheValueToSubDirectoryParams)

Type Parameters

  • SubDirectoryParamsT

Hierarchy (view full)

Implements

Constructors

Methods

  • Mark all cached values out of date that happened after the timeOfEarliestChange.

    Note: The individual implementations decide whether to invalidate the content of a folder. At the moment all implementations adhere to the >= timeOfEarliestChange rule, but this might change.

    Parameters

    • timeOfEarliestChange: Date

    Returns void