Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
AdviceSystem Class Reference

Description

the system-wide service to support the implementation of advice collaborations.

Manages storage for provided advice data and maintains an index table to determine the advice solutions on request.

Definition at line 115 of file advice.cpp.

Public Member Functions

 AdviceSystem ()
 
 ~AdviceSystem ()
 
void * allocateBuffer (size_t siz)
 low-level allocation of storage to hold advice data
 
void releaseBuffer (void *buff, size_t)
 
void manageAdviceData (PointOfAdvice *entry, DeleterFunc *how_to_delete)
 
void publishRequestBindingChange (PointOfAdvice &req, HashVal previous_bindingKey)
 
void registerRequest (PointOfAdvice &req)
 
void deregisterRequest (PointOfAdvice const &req)
 
void publishProvision (PointOfAdvice *newProvision, const PointOfAdvice *previousProvision)
 
void discardSolutions (const PointOfAdvice *existingProvision)
 

Private Member Functions

void discardEntry (PointOfAdvice *storedProvision)
 
- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Private Attributes

DelStash adviceDataRegistry_
 
Index< PointOfAdviceindex_
 

Additional Inherited Members

- Static Public Member Functions inherited from Sync< CONF >
static MonitorgetMonitor (Sync const *forThis)
 

Constructor & Destructor Documentation

◆ AdviceSystem()

AdviceSystem ( )
inline

Definition at line 124 of file advice.cpp.

◆ ~AdviceSystem()

~AdviceSystem ( )
inline

Definition at line 130 of file advice.cpp.

Member Function Documentation

◆ allocateBuffer()

void * allocateBuffer ( size_t  siz)
inline

low-level allocation of storage to hold advice data

Todo:
rewrite to use Lumiera's block allocator / memory pool /////////////////////////////////TICKET #609
Warning
the raw allocation and deallocation is not protected by the AdviceSystem monitor. Currently we don't need locking (heap allocation), but any custom allocator will have to care for its own locking!

Definition at line 147 of file advice.cpp.

References ERROR_LOG_AND_IGNORE.

◆ releaseBuffer()

void releaseBuffer ( void *  buff,
size_t   
)
inline

Definition at line 160 of file advice.cpp.

◆ manageAdviceData()

void manageAdviceData ( PointOfAdvice entry,
DeleterFunc how_to_delete 
)
inline

Definition at line 166 of file advice.cpp.

References DelStash::manage().

+ Here is the call graph for this function:

◆ discardEntry()

void discardEntry ( PointOfAdvice storedProvision)
inlineprivate
Parameters
storedProvision
Note
to be invoked from a locked scope

Definition at line 174 of file advice.cpp.

References DelStash::kill().

+ Here is the call graph for this function:

◆ publishRequestBindingChange()

void publishRequestBindingChange ( PointOfAdvice req,
HashVal  previous_bindingKey 
)
inline

Definition at line 187 of file advice.cpp.

References Index< POA >::modifyRequest().

+ Here is the call graph for this function:

◆ registerRequest()

void registerRequest ( PointOfAdvice req)
inline

Definition at line 195 of file advice.cpp.

References Index< POA >::addRequest().

+ Here is the call graph for this function:

◆ deregisterRequest()

void deregisterRequest ( PointOfAdvice const &  req)
inline

Definition at line 202 of file advice.cpp.

References Literal::c(), lumiera_error(), and Index< POA >::removeRequest().

+ Here is the call graph for this function:

◆ publishProvision()

void publishProvision ( PointOfAdvice newProvision,
const PointOfAdvice previousProvision 
)
inline

Definition at line 219 of file advice.cpp.

References Index< POA >::addProvision(), Index< POA >::modifyProvision(), and Index< POA >::removeProvision().

+ Here is the call graph for this function:

◆ discardSolutions()

void discardSolutions ( const PointOfAdvice existingProvision)
inline

Definition at line 236 of file advice.cpp.

References Index< POA >::removeProvision().

+ Here is the call graph for this function:

Member Data Documentation

◆ adviceDataRegistry_

DelStash adviceDataRegistry_
private

Definition at line 120 of file advice.cpp.

◆ index_

Index<PointOfAdvice> index_
private

Definition at line 121 of file advice.cpp.

+ Inheritance diagram for AdviceSystem:
+ Collaboration diagram for AdviceSystem:

The documentation for this class was generated from the following file: