Classes Files

com::wombat::mama::MamaSourceManager

More…

Inherited by com.wombat.mama.MamaSource

Public Functions

  Name
  MamaSourceManager()
MamaSource findOrCreateSource(final String sourceName)
MamaSource findSource(final String sourceName)
void addSource(MamaSource mamaSource)
void addSource(MamaSource mamaSource, final String sourceName)
int getSize()
Iterator sourceIterator()
void destroy()

Detailed Description

class com::wombat::mama::MamaSourceManager;

A Mama source manager maintains information about a set of data sources, including the quality of the data coming from sources.

Public Functions Documentation

function MamaSourceManager

inline MamaSourceManager()

Constructor - creates a new MamaSourceManager object

thread safe hashmap

function findOrCreateSource

inline MamaSource findOrCreateSource(
    final String sourceName
)

Parameters:

  • sourceName The string identifier for the mamaSource

Return: MamaSource

Locates an existing mamaSource for a given name, if none exists a new one is created and added to the source manager.

function findSource

inline MamaSource findSource(
    final String sourceName
)

Parameters:

  • sourceName The string identifier for the MamaSource

Return: MamaSource

locates an existing source for a given name, if none is found null is returned, The caller has to validate null value on return.

function addSource

inline void addSource(
    MamaSource mamaSource
)

Parameters:

  • mamaSource an existing mama source

Add an existing mama Source to the source manager. The id of the source will be used instead of the name to identify the source within the source manager.

function addSource

inline void addSource(
    MamaSource mamaSource,
    final String sourceName
)

Parameters:

  • mamaSource an existing mama source
  • sourceName The string identifier for the MamaSource

Add an existing mama Source to the source manager. The name will used to uniquely identify the source within the source manager.

function getSize

inline int getSize()

Return the size of the contents of source manager

function sourceIterator

inline Iterator sourceIterator()

function destroy

inline void destroy()

Reimplemented by: com::wombat::mama::MamaSource::destroy


Updated on 2023-03-31 at 15:29:43 +0100