19 #ifndef EQFABRIC_NODE_H
20 #define EQFABRIC_NODE_H
22 #include <eq/fabric/object.h>
23 #include <eq/fabric/types.h>
30 template<
class C,
class N,
class P,
class V >
class Node :
public Object
34 typedef std::vector< P* >
Pipes;
52 bool isApplicationNode()
const {
return _isAppNode; }
55 EQFABRIC_INL
void setApplicationNode(
const bool isAppNode );
58 EQFABRIC_INL NodePath getPath()
const;
59 P* findPipe(
const UUID&
id );
68 EQFABRIC_INL VisitorResult
accept( V& visitor );
71 EQFABRIC_INL VisitorResult
accept( V& visitor )
const;
85 IATTR_ALL = IATTR_LAST + 5
89 EQFABRIC_INL
void setIAttribute(
const IAttribute attr,
90 const int32_t value );
96 static const std::string& getIAttributeString(
const IAttribute attr );
101 EQFABRIC_INL
virtual void backup();
102 EQFABRIC_INL
virtual void restore();
103 void create( P** pipe );
104 void release( P* pipe );
105 virtual void output( std::ostream& )
const {}
106 EQFABRIC_INL
virtual uint128_t commit(
const uint32_t incarnation =
114 EQFABRIC_INL
virtual ~
Node();
117 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
118 const uint64_t dirtyBits );
120 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
121 const uint64_t dirtyBits );
123 EQFABRIC_INL
virtual void notifyDetach();
126 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits );
129 virtual ChangeType getChangeType()
const {
return UNBUFFERED; }
133 DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0,
134 DIRTY_PIPES = Object::DIRTY_CUSTOM << 1,
135 DIRTY_MEMBER = Object::DIRTY_CUSTOM << 2,
137 DIRTY_ATTRIBUTES | DIRTY_PIPES | DIRTY_MEMBER |
142 virtual uint64_t getRedistributableBits()
const
143 {
return DIRTY_NODE_BITS; }
156 int32_t iAttributes[IATTR_ALL];
165 template<
class,
class,
class,
class >
friend class Pipe;
166 void _addPipe( P* pipe );
167 bool _removePipe( P* pipe );
170 bool _mapNodeObjects() {
return _config->mapNodeObjects(); }
173 template<
class C,
class N,
class P,
class V > EQFABRIC_INL
174 std::ostream& operator << ( std::ostream&, const Node< C, N, P, V >& );
178 #endif // EQFABRIC_NODE_H
Internal base class for all distributed, inheritable Equalizer objects.
IAttribute
Possible values for integer attributes.
IAttribute
Integer attributes.
const Pipes & getPipes() const
const C * getConfig() const
A Node represents a single computer in the cluster.
std::vector< P * > Pipes
A vector of pointers to pipes.
EQFABRIC_INL VisitorResult accept(V &visitor)
Perform a depth-first traversal of this node.
EQFABRIC_INL int32_t getIAttribute(const IAttribute attr) const
virtual EQFABRIC_INL void setDirty(const uint64_t bits)
Base data transport class for nodes.
Timeout when auto-launching the node.