Inheritance diagram for ProtocolReader:
Public Member Functions | |
this (IBuffer buffer) | |
IPayload | getPayload (inout char[] channel, inout char[] element, inout ubyte cmd) |
ClusterContent | getPacket (inout char[] channel, inout char[] element, inout ubyte cmd) |
Private Member Functions | |
Object | thaw () |
Everything is written in Network order (big endian).
Definition at line 59 of file ProtocolReader.d.
|
Construct a ProtocolReader upon the given buffer. As Objects are serialized, their content is written to this buffer. The buffer content is then typically flushed to some external conduit, such as a file or socket. Note that serialized data is always in Network order. Reimplemented from PickleReader. Definition at line 72 of file ProtocolReader.d. |
|
Return the payload if there was one, null otherwise. Definition at line 85 of file ProtocolReader.d. References PickleReader::thaw(). Referenced by CacheServer::LoaderThread::load(), BulletinConsumer::notify(), Node::request(), and testProtocol(). |
|
Return a duplicated slice of the buffer representing the recieved payload. This is a bit of a hack, but eliminates a reasonable amount of overhead. Note that the channel/key text is retained right at the start of the buffer, allowing the writer to toss the whole thing back without any further munging. Definition at line 118 of file ProtocolReader.d. References ClusterContent. Referenced by CacheServer::LoaderThread::load(), and ClusterThread::run(). |
|
Reconstruct an Object from the current buffer content. It is considered optimal to configure the underlying IReader with an allocator that slices array-references, rather than copying them into the heap (the default configuration). Definition at line 187 of file PickleReader.d. Referenced by VirtualCache::get(), and getPayload(). |