|
DUECA/DUSIME
|
An StreamChannelWriteToken can be used to write data to a stream channel. More...
#include <StreamAccessToken.hxx>


Public Member Functions | |
| void | getAccess (T *&data, const TimeSpec &t) |
| Makes the reference to the data valid. | |
| void | releaseAccess (T *&data) |
| Releases the write channel access pointer. | |
| StreamChannelWriteToken (const GlobalId &holder, const NameSet &name_set, int ndc=11, Channel::TransportClass tclass=Channel::Regular, GenericCallback *when_valid=NULL) | |
| Constructor. | |
| ~StreamChannelWriteToken () | |
| Destructor. | |
Public Member Functions inherited from dueca::ChannelWriteToken | |
| ChannelWriteToken (const GlobalId &owner, const NameSet &channelname, const std::string &dataclassname, const std::string &entrylabel=std::string(), Channel::EntryTimeAspect time_aspect=Channel::Continuous, Channel::EntryArity arity=Channel::OnlyOneEntry, Channel::PackingMode packmode=Channel::OnlyFullPacking, Channel::TransportClass tclass=Channel::Regular, const UCallbackOrActivity &when_valid=UCallbackOrActivity(), unsigned nreservations=0) | |
| Constructor, creates a token to write data in the channel, and if needed it creates the associated channel end. | |
| ~ChannelWriteToken () | |
| Destructor. | |
| void | decodeAndWriteData (AmorphReStore &s, const DataTimeSpec &ts) |
| Write channel data from a storage object. | |
| bool | isValid () |
| Check the validity of the token. | |
| entryid_type | getEntryId () const |
| Get the entry number. | |
| ChannelEntryInfo | getChannelEntryInfo () const |
| Retrieve creation/entry information. | |
| bool | applyFunctor (DCOFunctor *fnct, const DataTimeSpec &time) |
| Apply a given functor to write channel data. | |
| void | reWrite (const DataTimeSpec &time) |
| Simply re-write the current (or default) data for a new time. | |
| const std::string & | getDataClassName () const |
| Return the data class. | |
Public Member Functions inherited from dueca::GenericToken | |
| const GlobalId & | getTokenHolder () const |
| Return the ID of the owner. | |
| const GlobalId & | getChannelId () const |
| Return the ID of the channel. | |
| const NameSet & | getName () const |
| Return the local name specified for the token. | |
| const std::string & | getDataClassName () const |
| Return the data class name. | |
| uint32_t | getDataClassMagic () const |
| Access the data class magic. | |
| virtual | ~GenericToken () |
| Destructor. | |
| GenericToken (const GlobalId &holder, const NameSet &name, const std::string &dataclassname) | |
| Constructor. | |
| template<class MFT > | |
| std::weak_ptr< MFT > | getMetaFunctor (const std::string &fname) const |
| Obtain a specific metafunctor for interaction with channel data. | |
Public Member Functions inherited from dueca::TriggerPuller | |
| const std::string & | getTriggerName () const |
| Find a name. | |
Additional Inherited Members | |
Protected Types inherited from dueca::TriggerPuller | |
| typedef list< TargetData > | targetlist_type |
| Combination of a target, someone to pull if requested, and the index that target needs to identify this puller. | |
Protected Member Functions inherited from dueca::ChannelWriteToken | |
| void * | getAccess (uint32_t magic) |
| Return a void pointer to a new data location. | |
| void | checkAccess (uint32_t magic) |
| Check whether magic is good, and token is valid. | |
| void | releaseAccess (const void *data_ptr, const DataTimeSpec &ts) |
| Return the read access given previously, creating the effective write,. | |
| void | discardAccess (const void *data_ptr) |
| Discard the read access, abandoning an attempted write. | |
Protected Member Functions inherited from dueca::GenericToken | |
| void | checkChannelEndPresent () const |
| Check preconditions. | |
Protected Member Functions inherited from dueca::TriggerPuller | |
| void | pull (const DataTimeSpec &ts) |
| activate and notify the targets | |
| TriggerPuller (const std::string &name=std::string()) | |
| Constructor. | |
| virtual | ~TriggerPuller () |
| Destructor. | |
| virtual void | addTarget (const boost::intrusive_ptr< TriggerTarget > &target, unsigned id) |
| Add a target to this puller, only called by TriggerTarget's setTrigger. | |
| virtual void | removeTarget (const TriggerTarget *target) |
| Remove a target from the puller, only called by destructor. | |
| virtual void | setTriggerName () |
| Update the name, used by ConditionAnd and ConditionOr. | |
Protected Attributes inherited from dueca::GenericToken | |
| std::string | dataclassname |
| name of the data type | |
| const DataSetConverter * | converter |
| Converter for the data. | |
| uint32_t | magic_number |
| magic number for the data class name claimed here | |
| UnifiedChannel * | channel |
| pointer to the channel | |
Protected Attributes inherited from dueca::TriggerPuller | |
| targetlist_type | targets |
| List of targets and indices. | |
| std::bitset< MAX_MANAGERS > | activitylevels |
| Index of activitymanager levels. | |
| std::string | name |
| Name, for debugging purposes. | |
An StreamChannelWriteToken can be used to write data to a stream channel.
Construct the access token and keep it, to gain access to the channel. Please check with GenericToken::isValid() before writing.
Note that StreamChannelWriteToken is obsolete; please use ChannelWriteToken in new code.
| dueca::StreamChannelWriteToken< T >::StreamChannelWriteToken | ( | const GlobalId & | holder, |
| const NameSet & | name_set, | ||
| int | ndc = 11, | ||
| Channel::TransportClass | tclass = Channel::Regular, | ||
| GenericCallback * | when_valid = NULL ) |
Constructor.
Constructs an access token to write the stream channel with the specified name.
| holder | ID of the requester. |
| name_set | NameSet with the name of the channel that you request access for. |
| ndc | For compatibility with older DUECA, not relevant for DUECA 2.0 or later. Used to indicate number of copies reserved in the channel. |
| tclass | Transport class for the channel. Current options are Regular and Bulk. Bulk is really not recommended for stream channels. |
| when_valid | Method called when the token becomes valid. |
| dueca::StreamChannelWriteToken< T >::~StreamChannelWriteToken | ( | ) |
Destructor.
The existence of the channel may continue, it is really destroyed when you were the last user.
| void dueca::StreamChannelWriteToken< T >::getAccess | ( | T *& | data, |
| const TimeSpec & | t ) |
Makes the reference to the data valid.
As a side effect the access to the data is registered. NOTE: as of july 2001, this call is deprecated. Use a StreamWriter instead!
| data | Pointer to data for result |
| t | Access time |
| void dueca::StreamChannelWriteToken< T >::releaseAccess | ( | T *& | data | ) |
Releases the write channel access pointer.
The data access registration is undone, and data will be sent/distributed if needed. NOTE: as of july 2001, this call is deprecated. Use a StreamWriter instead!