24 #include <co/object.h>
29 namespace detail {
class Barrier; }
64 CO_API
void setHeight(
const uint32_t height );
83 CO_API
void enter(
const uint32_t timeout = LB_TIMEOUT_INDEFINITE );
89 virtual void attach(
const UUID&
id,
const uint32_t instanceID );
100 detail::Barrier*
const _impl;
102 void _cleanup(
const uint64_t time );
103 void _sendNotify(
const uint128_t& version,
NodePtr node );
106 bool _cmdEnter(
ICommand& command );
107 bool _cmdEnterReply(
ICommand& command );
109 LB_TS_VAR( _thread );
113 #endif // CO_BARRIER_H
CO_API uint32_t getHeight() const
virtual CO_API ~Barrier()
Destruct the barrier.
A networked, versioned barrier.
virtual void pack(DataOStream &os)
Serialize the modifications since the last call to commit().
A class managing received commands.
virtual void getInstanceData(DataOStream &os)
Serialize all instance information of this distributed object.
CO_API void setHeight(const uint32_t height)
Set the number of participants in the barrier.
ChangeType
Object change handling characteristics, see Programming Guide.
CO_API Barrier(NodePtr master=0, const uint32_t height=0)
Construct a new barrier.
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
A std::istream-like input data stream for binary data.
CO_API void enter(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Enter the barrier, blocks until the barrier has been reached.
virtual void unpack(DataIStream &is)
Deserialize a change.
virtual void applyInstanceData(DataIStream &is)
Deserialize the instance data.
A std::ostream-like interface for object serialization.
CO_API void increase()
Add one participant to the barrier.
virtual ChangeType getChangeType() const