Inherits from com.wombat.mama.MamaSourceGroupListener
Name | |
---|---|
MamaSourceGroup(String name) | |
void | enableLogging(Level level) |
void | disableLogging() |
String | getName() |
MamaSource | findSource(final String sourceName) |
void | addSource(MamaSource source, long weight) |
void | addSourceWithName(MamaSource source, String sourceName, long weight) |
void | setSourceWeight(String sourceName, long weight) |
boolean | reevaluate() |
MamaSource | getTopWeightSource() |
void | registerStateChangeListener(MamaSourceStateChangeListener event) |
void | unregisterStateChangeListener(MamaSourceStateChangeListener event) |
Iterator | sourceIterator() |
inline MamaSourceGroup(
String name
)
Create a mamaSourceGroup object.
inline void enableLogging(
Level level
)
inline void disableLogging()
inline String getName()
Return: The group name
Return the name string identifier for the specified source group.
inline MamaSource findSource(
final String sourceName
)
Parameters:
Return: MamaSource
Find a source with the given name in the group.
inline void addSource(
MamaSource source,
long weight
)
Parameters:
Add a mamaSource to the specified group with the specified weighting. The source id will be used by the group to uniquely identify the source.
inline void addSourceWithName(
MamaSource source,
String sourceName,
long weight
)
Parameters:
Add a mamaSource to the specified group with the specified weighting and string name identifier.
inline void setSourceWeight(
String sourceName,
long weight
)
Parameters:
Set the weight for an existing mamaSource in the specified group.
inline boolean reevaluate()
Return: boolean Whether any states were changed as a result of the call. false indicates none were changed. true indicates that the state of one or more sources has changed.
Re-evaluate the group by checking all of the relative weights and changing the state of each MamaSource in the group as appropriate. Returns true if any states were changed; otherwise false.
inline MamaSource getTopWeightSource()
Return the top weighted source for this source group
inline void registerStateChangeListener(
MamaSourceStateChangeListener event
)
Parameters:
Reimplements: com::wombat::mama::MamaSourceGroupListener::registerStateChangeListener
Applications interested in event notifications can register for events.
inline void unregisterStateChangeListener(
MamaSourceStateChangeListener event
)
Parameters:
Reimplements: com::wombat::mama::MamaSourceGroupListener::unregisterStateChangeListener
Applications interested in event notifications can unregister for events.
inline Iterator sourceIterator()
Updated on 2023-03-31 at 15:29:43 +0100