Free Electron
|
ConnectedCatalog over ZeroMQ. More...
#include <SharedMemCatalog.h>
Public Member Functions | |
void | initialize (void) |
Public Member Functions inherited from fe::ext::ConnectedCatalog | |
void | initialize (void) |
virtual Result | configure (String a_line) override |
Provide a parsable setup string. More... | |
virtual Result | start (void) override |
Initiate connections. More... | |
virtual Result | stop (void) override |
Disconnect and stop initiating connections. More... | |
virtual Result | waitForConnection (void) override |
Return only after a connection has been made. More... | |
virtual BWORD | started (void) const override |
Check if the catalog wants to connect. More... | |
virtual BWORD | connected (void) const override |
Check if the catalog has connections. More... | |
virtual void | setConnectionTimeout (Real a_seconds) |
Indicate how long the server may remain quiet. More... | |
virtual Result | flush (void) override |
Indicate the end of an atomic set of changes. More... | |
virtual Result | waitForUpdate (I32 &a_rFlushCount, I32 &a_rSpins, volatile BWORD &a_rKeepWaiting, I32 a_microSleep) override |
Wait for a state change. More... | |
virtual Result | lockAfterUpdate (I32 &a_rFlushCount, I32 &a_rSpins, volatile BWORD &a_rKeepWaiting, I32 a_microSleep) override |
Wait for a state change and then lock the mutex. More... | |
Public Member Functions inherited from fe::StateCatalog | |
Result | getTypeName (String a_name, String &a_rTypeName) const |
Get state with mutex (default property) More... | |
Result | getTypeName (String a_name, String a_property, String &a_rTypeName) const |
Get state with mutex. More... | |
void | getStateKeys (Array< String > &a_keys, String a_pattern=".*") const |
Returns keys that match the regex pattern. More... | |
void | getStateProperties (String a_name, Array< String > &a_properties) const |
Returns properties for a key. More... | |
template<class T > | |
Result | getState (String a_name, T &a_rValue) const |
Get state with mutex (default property) More... | |
template<class T > | |
Result | getState (String a_name, String a_property, T &a_rValue) const |
Get state with mutex. More... | |
Result | getState (String a_name, String a_property, String &a_rTypeName, String &a_rValue) const |
template<class T > | |
Result | justGetState (String a_name, String a_property, T &a_rValue) const |
Get state with mutex, but without calling the internal preGet() and postGet() methods. More... | |
template<class T > | |
Result | setState (String a_name, const T &a_rValue) |
Set state with mutex (default property) More... | |
template<class T > | |
Result | setState (String a_name, String a_property, const T &a_rValue) |
Set state with mutex. More... | |
Result | setState (String a_name, String a_property, String a_typeName, String a_value) |
Set state with mutex (serialized) More... | |
Result | removeState (String a_name, String a_property) |
Remove a state, with mutex. More... | |
Result | removeState (String a_name) |
Remove all properties of a state, with mutex. More... | |
Result | overlayState (sp< Catalog > a_spOtherCatalog) |
Set state for entries in a Catalog, with mutex. More... | |
Result | getTypeNameUnsafe (String a_name, String &a_rTypeName) const |
Get state without mutex. More... | |
Result | getTypeNameUnsafe (String a_name, String a_property, String &a_rTypeName) const |
Get state without mutex (default property) More... | |
template<class T > | |
Result | getStateUnsafe (String a_name, T &a_rValue) const |
Get state without mutex. More... | |
template<class T > | |
Result | getStateUnsafe (String a_name, String a_property, T &a_rValue) const |
Get state without mutex (default property) More... | |
Result | snapshot (sp< Snapshot > &a_rspSnapshot) |
Grab current state into a fixed snapshot. More... | |
void | incrementSerial (void) |
Increment the serial index, indicating a collective change of state. More... | |
void | incrementFlushCount (void) |
Increment the count of incoming flushes indicating a collective remote change of state. More... | |
template<class T > | |
Result | sendMessage (String a_name, const T &a_rValue) |
Append value to remote queues. More... | |
template<class T > | |
Result | nextMessage (String a_name, T &a_rValue) |
Pop received value from front of queue. More... | |
Result | addListener (sp< ListenerI > a_spListener, String a_name) |
Add a ListenerI for a specific key. More... | |
template<> | |
Result | nextMessage (String a_name, String &a_rValue) |
Public Member Functions inherited from fe::Catalog | |
sp< Catalog > | catalogShallowCopy (void) |
Returns a mirror of the catalog. More... | |
sp< Catalog > | catalogDeepCopy (void) |
Returns a duplicate of the catalog. More... | |
U32 | catalogSize (void) const |
Returns the number of name keys. More... | |
String | catalogKey (U32 index) const |
Returns a key by ordered index. More... | |
void | catalogKeys (Array< String > &a_keys, String a_pattern=".*") const |
Returns keys in order of creation. More... | |
void | catalogProperties (String a_name, Array< String > &a_properties) const |
Returns properties for a key. More... | |
BWORD | cataloged (String a_name, String a_property="value") const |
Returns TRUE if the given property for the given name has been created. More... | |
BWORD | catalogedAny (String a_name) const |
Returns TRUE if any property for the given name has been created. More... | |
void | catalogClear (void) |
Remove all entries. More... | |
void | catalogOverlay (sp< Catalog > a_spOtherCatalog, Array< String > *a_pTypeList=NULL, BWORD a_shallow=FALSE) |
Duplicates entries from another catalog. More... | |
sp< Component > | catalogComponent (String implementation, String a_name, String a_property="value") |
Returns a component entry of the given property for the given name. More... | |
sp< Component > | catalogComponent (sp< Component > a_spComponent, String a_name, String a_property="value") |
Returns a component entry of the given property for the given name. More... | |
Instance & | catalogInstance (Instance &instance, String a_name, String a_property="value") |
Returns the literal Instance of the given property for the given name. More... | |
Instance & | catalogInstance (String a_name, String a_property="value") |
Returns the literal Instance of the given property for the given name. More... | |
const fe_type_info & | catalogTypeInfo (String a_name, String a_property="value") const |
Returns the type_info of the given property for the given name. More... | |
const String | catalogTypeName (String a_name, String a_property="value") const |
Returns the type name of the given property, determined by the TypeMaster. More... | |
template<class T > | |
BWORD | catalogTypeIs (String a_name, String a_property="value") const |
Returns TRUE if given catalog entry match the template type. More... | |
template<class T > | |
T & | catalog (String a_name, String a_property="value") |
Returns existing catalog entry if already set or a default if not. More... | |
template<class T > | |
T & | catalog (String a_name, String a_property, const T &a_default) |
Returns existing catalog entry if already set or default if not. More... | |
template<class T > | |
const T & | catalogOrDefault (String a_name, String a_property, const T &a_default) const |
Returns existing catalog entry if already set or default if not. More... | |
template<class T > | |
const T & | catalogOrDefault (String a_name, const T &a_default) const |
String | catalogValue (String a_name, String a_property="value") const |
Returns existing catalog entry, converted to a String. More... | |
I32 | catalogBytes (String a_name, String a_property, Array< U8 > &a_rByteArray) const |
Converts a catalog entry, into raw binary. More... | |
BWORD | catalogSet (String a_name, String a_property, String a_value) |
Sets the value for a catalog entry, converted to the existing type, from a given String. More... | |
BWORD | catalogSet (String a_name, String a_value) |
BWORD | catalogSet (String a_name, String a_property, String a_type, String a_value, Instance **a_ppInstance=NULL) |
Sets the value for a catalog entry, converted to the existing type, from a given String. More... | |
BWORD | catalogSet (String a_name, String a_property, String a_type, const U8 *a_pRawBytes, I32 a_byteCount, Instance **a_ppInstance=NULL) |
Sets the value for a catalog entry, using a raw byte block. More... | |
template<class T > | |
T & | catalogOrException (String a_name, String a_property) const |
Returns an existing catalog entry, if it exists. More... | |
bool | catalogLookup (const String a_name, String a_property, Instance &a_instance) const |
Gets the Instance of an existing catalog entry, if it exists. More... | |
bool | catalogLookup (const String a_name, Instance &a_instance) const |
void | catalogMoveToEnd (String a_name) |
Move all properties for name to bottom. More... | |
void | catalogRemove (String a_name) |
Remove all properties for a name. More... | |
void | catalogRemove (String a_name, String a_property) |
Remove one property for a name. More... | |
void | catalogDump (void) const |
Print a description of the catalog to the log. More... | |
sp< TypeMaster > | typeMaster (void) const |
Public Member Functions inherited from fe::Component | |
const String & | name (void) const |
Return the components chosen name. More... | |
const String | verboseName (void) const |
Return the annotated chosen name. More... | |
void | setName (const String &name) |
Rename the component to anything you want. More... | |
hp< Registry > | registry (void) const |
Get the Registry that created this component. More... | |
void | adjoin (sp< Component > spComponent) |
Tie this component's lifetime to another. More... | |
sp< Component > | create (const String &implementation, BWORD quiet=FALSE) const |
Convienience function to registry()->create() More... | |
void | disjoin (void) |
Untie component from Hub, if connected. More... | |
String | factoryName (void) |
void | setLibrary (sp< Library > spLibrary) |
Store a reference to the library used to instantiate this component. More... | |
sp< Library > | library (void) |
Get the library that created the component. More... | |
void | setFactoryIndex (I32 a_factoryIndex) |
Set the library's factory index. More... | |
I32 | factoryIndex (void) |
Get the library's factory index. More... | |
void | setSingleton (BWORD set) |
Specify whether component is a singleton. More... | |
BWORD | isSingleton (void) |
Return whether component is a singleton. More... | |
virtual void | acquire (void) |
Specialized reference increment. More... | |
virtual void | release (void) |
Specialized reference decrement. More... | |
Public Member Functions inherited from fe::Handled< Component > | |
const hp< Component > & | getHandle (void) const |
Get a safe handle to this object. More... | |
Public Member Functions inherited from fe::Protectable | |
virtual I32 | protection (void) const |
virtual void | protect (void) |
virtual void | unprotect (void) |
virtual Protectable * | clone (Protectable *pInstance=NULL) |
Public Member Functions inherited from fe::Counted | |
virtual void | acquire (int &rCount) |
Increment the reference count (and get the count) More... | |
virtual void | abandon (void) |
Decrement the reference count. More... | |
int | count (void) const |
Return the count of references. More... | |
void | setName (const String &) |
void | trackReference (void *pReference, String what) |
void | untrackReference (void *pReference) |
void | registerRegion (void *pT, U32 bytes) |
Public Member Functions inherited from fe::Initialized | |
void | initializeAll (void) |
void | setActive (bool a_active) |
Protected Member Functions | |
virtual Result | disconnect (void) override |
virtual Result | dropConnection (void) |
virtual Result | removeIdentity (I32 a_index) override |
virtual Result | connectAsServer (String a_address, U16 a_port) override |
virtual Result | connectAsClient (String a_address, U16 a_port) override |
virtual Result | catchUp (Identity &a_rIdentity) |
Protected Member Functions inherited from fe::ext::ConnectedCatalog | |
virtual Result | preGet (String a_name, String a_property) const override |
virtual Result | postSet (String a_name, String a_property) override |
virtual Result | connect (void) |
virtual void | broadcastUpdate (String a_name, String a_property) |
virtual void | heartbeat (void) |
virtual void | service (void) |
virtual BWORD | useBinaryForType (String a_type) const |
void | broadcastMessage (String a_name, String a_message) |
void | broadcastTick (void) |
void | timerRestart (void) |
BWORD | timerReached (void) const |
Real | timerSeconds (void) const |
void | tickerRestart (void) |
BWORD | tickerReached (void) const |
Real | tickerSeconds (void) const |
const String & | role (void) const |
bool | aborting (void) const |
void | requestDisconnect (void) |
bool | disconnecting (void) const |
void | stall (void) const |
void | microPause (I32 a_microSeconds) const |
void | yield (void) const |
void | serviceYield (void) const |
void | queueRepeat (Command a_command, String a_name, String a_property, String a_message, String a_source, U8 *a_pRawBytes, I32 a_byteCount) |
Result | flushRepeats (BWORD a_signalsOnly) |
void | update (Command a_command, String a_source, String a_key, String a_property, String a_type, String a_text, const U8 *a_pRawBytes=NULL, I32 a_byteCount=0) |
virtual Result | removeIdentity (const Identity &a_rIdentity) |
Result | catchUpAsNeeded (void) |
Protected Member Functions inherited from fe::StateCatalog | |
virtual Result | postGet (String a_name, String a_property) const |
virtual Result | preSet (String a_name, String a_property) |
I32 | serial (void) const |
I32 | flushCount (void) const |
Result | addNotification (String a_name, String a_property) |
Result | sendNotifications (void) |
Result | notify (String a_name, String a_property) |
template<class T > | |
Result | updateState (String a_name, String a_property, const T &a_rValue) |
Result | updateState (String a_name, String a_property, String a_typeName, String a_value) |
Result | updateState (String a_name, String a_property, String a_typeName, const U8 *a_pRawBytes, I32 a_byteCount) |
Result | clearState (String a_name, String a_property) |
Protected Member Functions inherited from fe::Handled< Component > | |
void | abandonHandle (void) |
Protected Member Functions inherited from fe::Counted | |
int | releaseInternal (void) |
Decrement the reference count. More... | |
void | suppressReport (void) |
Protected Member Functions inherited from fe::Initialized | |
void | addInitializer (InitializeFunction function) |
Private Member Functions | |
virtual void | broadcastSelect (String a_name, String a_property, String a_message, I32 a_includeCount, const String *a_pIncludes, I32 a_excludeCount, const String *a_pExcludes, const U8 *a_pRawBytes=NULL, I32 a_byteCount=0) override |
Private Attributes | |
BWORD | m_usePublicChannel |
Thread * | m_pReceiverThread |
ReceiverTask | m_receiverTask |
Additional Inherited Members | |
Static Public Member Functions inherited from fe::Counted | |
static String | reportTracker (void) |
static U32 | trackerCount (void) |
Protected Types inherited from fe::ext::ConnectedCatalog | |
enum | Command { e_unknown =0, e_update, e_signal, e_remove } |
Protected Types inherited from fe::Initialized | |
typedef void(* | InitializeFunction) (Initialized *) |
Protected Attributes inherited from fe::ext::ConnectedCatalog | |
Identity | m_identityArray [FE_CNC_MAX_CLIENTS] |
I32 | m_identityCount |
BWORD | m_lockOnUpdate |
Related Functions inherited from fe::Component | |
FE_DL_EXPORT void FE_CDECL | checkUnload (sp< Library > &pLibrary, Component *pComponent=NULL) |
Delete the component and unload libraries where appropriate. More... | |
ConnectedCatalog over ZeroMQ.